restructured

This commit is contained in:
ben
2026-08-17 16:29:11 +02:00
parent d47a46c81e
commit 80f7f2978d
2 changed files with 72 additions and 15 deletions
+3 -6
View File
@@ -315,12 +315,9 @@ def api_room_whoami(
room_id: int,
user_id: int = Depends(get_current_user),
):
role = whoami(
room_id,
user_id,
)
permissions = whoami(room_id, user_id)
if role is None:
if not permissions["member"]:
raise HTTPException(
status_code=403,
detail="not a room member",
@@ -329,7 +326,7 @@ def api_room_whoami(
return {
"room_id": room_id,
"user_id": user_id,
"role": role,
**permissions,
}