The admin set-admin-flag, set-status and delete-user operations were implemented twice — once in the v1 echo handlers, once in the v2 Huma handlers. Extract the load/guard/mutate logic into models.SetUserAdminFlag, models.SetUserStatusAsAdmin and models.DeleteUserAsAdmin so both APIs call the same code; each handler keeps only its own request binding, validation and response shape. v1 stays byte-identical on the wire. |
||
|---|---|---|
| .. | ||
| shared | ||
| v1 | ||
| v2 | ||