Fixed update user #70
This commit is contained in:
parent
c5f371e0d5
commit
29fa35dffe
@ -112,7 +112,7 @@ class AuthController:
|
||||
@Route.authorize
|
||||
async def update_user_as_admin(self):
|
||||
dto: UpdateAuthUserDTO = JSONProcessor.process(UpdateAuthUserDTO, request.get_json(force=True, silent=True))
|
||||
await self._auth_service.update_user_async(dto)
|
||||
await self._auth_service.update_user_as_admin_async(dto)
|
||||
return '', 200
|
||||
|
||||
@Route.post(f'{BasePath}/refresh')
|
||||
|
@ -273,6 +273,7 @@ class AuthService(AuthServiceABC):
|
||||
if user.auth_role == update_user_dto.auth_user.auth_role and user.auth_role != update_user_dto.new_auth_user.auth_role:
|
||||
user.auth_role = update_user_dto.new_auth_user.auth_role
|
||||
|
||||
self._auth_users.update_auth_user(user)
|
||||
self._db.save_changes()
|
||||
|
||||
async def delete_auth_user_by_email_async(self, email: str):
|
||||
|
Loading…
Reference in New Issue
Block a user