#How to create a user with a hash password using prisma studio or terminal .

5 messages · Page 1 of 1 (latest)

warm sandal
#

I have a specific case, i try to build a dashboard where the user cannot create account , so i should create the account manually (for now ).
I can hash the created user when they use api but this not the behavior that im looking for.
i can hash the user if i use the api register.
Thanks in advance.

high lintel
#

This would be a good task for REPL: https://docs.nestjs.com/recipes/repl
That will start the app in your CLI in interactive mode. There you can get the service that the API calls (e.g. a = get(UsersService) and run the register method, or just the hashing method
h = await a.hashPassword("mypass")

warm sandal
#

thank you so match @high lintel for all this useful information.

#

Just a question: when you deploy your app, do you find it difficult to deal with the database when transitioning to production, especially when missing an admin panel? I previously used Django REST Framework, and it was very easy to manage. So, how do you modify data in production with NestJS?