Server backup 2026-11-07 of uncommitted work in projects/pharma-web-celtic
Snapshot of the working tree on srv1071960 (branch main), taken during server cleanup. .env files, node_modules, builds, logs and media were excluded.
This commit is contained in:
+3
-3
@@ -24,17 +24,17 @@ async def my_profile(
|
||||
@router.get("/{user_id}/overview")
|
||||
async def user_overview(
|
||||
user_id: uuid.UUID,
|
||||
current_user: User = Depends(require_role(Role.ADMIN, Role.GM)),
|
||||
current_user: User = Depends(require_role(Role.ADMIN, Role.AGM)),
|
||||
db: AsyncSession = Depends(get_db),
|
||||
) -> dict:
|
||||
"""The whole picture of one person, for the General Manager and Admin."""
|
||||
"""The whole picture of one person, for the Assistant General Manager and Admin."""
|
||||
return await overview.user_overview(db, current_user, user_id)
|
||||
|
||||
|
||||
@router.get("", response_model=list[UserRead])
|
||||
async def list_users(
|
||||
role: Role | None = None,
|
||||
current_user: User = Depends(require_role(Role.ADMIN, Role.GM)),
|
||||
current_user: User = Depends(require_role(Role.ADMIN, Role.AGM)),
|
||||
db: AsyncSession = Depends(get_db),
|
||||
) -> list[User]:
|
||||
return await UserService(db).list_users(current_user, role)
|
||||
|
||||
Reference in New Issue
Block a user