You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User creation logic should be factored out of the AccountController, especially the unique user name and email logic.
This will make it easier to create a create-user Bakery command since all verifications prior to the user creation won't be duplicated, but centralized. When writing tests, Factories can also produce false positive since they can generate the same name/email twice.
User creation logic should be factored out of the
AccountController
, especially the unique user name and email logic.This will make it easier to create a
create-user
Bakery command since all verifications prior to the user creation won't be duplicated, but centralized. When writing tests, Factories can also produce false positive since they can generate the same name/email twice.Note that this is currently an issue since there's major code duplication between
AccountController
andCreateAdminUser
The
User
model could be a nice place to do this.The text was updated successfully, but these errors were encountered: