restructured
This commit is contained in:
1 parent
d47a46c81e
commit
80f7f2978d
2 files changed
+72
-15
No files matched your search
+3
-6
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user