Your wiring is almost correct -- it transposes the two hot legs, which is more-or-less harmless, fortunately, so you don't need to throw your adapter out if you have already built it. The good news is that the other answer is pretty categorically wrong:
240.4 Protection of Conductors. Conductors, other than
flexible cords, flexible cables, and fixture wires, shall be
protected against overcurrent in accordance with their ampacities specified in 310.15, unless otherwise permitted or
required in 240.4(A) through (G).
240.5 Protection of Flexible Cords, Flexible Cables, and
Fixture Wires. Flexible cord and flexible cable, including
tinsel cord and extension cords, and fixture wires shall be
protected against overcurrent by either 240.5(A) or (B).
(B) Branch-Circuit Overcurrent Device. Flexible cord
shall be protected, where supplied by a branch circuit, in
accordance with one of the methods described in
240.5(B)(1), (B)(3), or (B)(4). Fixture wire shall be protected, where supplied by a branch circuit, in accordance with 240.5(B)(2).
(1) Supply Cord of Listed Appliance or Luminaire.
Where flexible cord or tinsel cord is approved for and used
with a specific listed appliance or luminaire, it shall be
considered to be protected when applied within the appliance
or luminaire listing requirements. For the purposes of this section, a luminaire may be either portable or permanent.