add user get, access token add id

This commit is contained in:
IluaAir
2025-07-27 12:55:58 +03:00
parent d3eba77444
commit 7c334491c3
4 changed files with 13 additions and 6 deletions

View File

@@ -17,3 +17,9 @@ async def get_me(user: ActiveUser):
async def get_all_users(db: sessionDep, user: AdminUser):
users = await UserService(db).get_all_users()
return users
@router.get("/{id}")
async def get_user_by_id(db: sessionDep, id: int, user: AdminUser):
user = await UserService(db).get_user_by_filter_or_raise(id=id)
return user