generated from moevm/nsql-clean-tempate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Исправил хеширование паролей инициализированных пользователей
- Loading branch information
Showing
2 changed files
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
from dao.user import create_user, find_user_by_email | ||
from schemas.user import UserCreateSchema, Role | ||
from utils.password import get_password_hash | ||
|
||
|
||
async def create_users(): | ||
|
@@ -8,7 +9,7 @@ async def create_users(): | |
lastname='Петров', | ||
middlename='Александрович', | ||
email='[email protected]', | ||
password='admin123', | ||
password=get_password_hash('admin123'), | ||
role=Role.admin | ||
) | ||
|
||
|
@@ -17,7 +18,7 @@ async def create_users(): | |
lastname='Смирнова', | ||
middlename='Ивановна', | ||
email='[email protected]', | ||
password='securepassword1', | ||
password=get_password_hash('securepassword1'), | ||
role=Role.foreman | ||
) | ||
|
||
|
@@ -26,7 +27,7 @@ async def create_users(): | |
lastname='Кузнецов', | ||
middlename='Петрович', | ||
email='[email protected]', | ||
password='securepassword2', | ||
password=get_password_hash('securepassword2'), | ||
role=Role.worker | ||
) | ||
|
||
|
@@ -35,7 +36,7 @@ async def create_users(): | |
lastname='Сидоров', | ||
middlename='Леонидович', | ||
email='[email protected]', | ||
password='securepassword3', | ||
password=get_password_hash('securepassword3'), | ||
role=Role.customer | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters