diff --git a/kdb-bot/src/bot_api/controller/auth_controller.py b/kdb-bot/src/bot_api/controller/auth_controller.py index 5342df92c6..a23d490dff 100644 --- a/kdb-bot/src/bot_api/controller/auth_controller.py +++ b/kdb-bot/src/bot_api/controller/auth_controller.py @@ -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') diff --git a/kdb-bot/src/bot_api/service/auth_service.py b/kdb-bot/src/bot_api/service/auth_service.py index 0a78a9c448..e1e4a2b943 100644 --- a/kdb-bot/src/bot_api/service/auth_service.py +++ b/kdb-bot/src/bot_api/service/auth_service.py @@ -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):