kaas
This commit is contained in:
@@ -37,7 +37,6 @@ from permissions import (
|
||||
|
||||
from rooms import (
|
||||
create_room,
|
||||
search_room,
|
||||
accept_room,
|
||||
get_rooms,
|
||||
get_room,
|
||||
@@ -376,32 +375,6 @@ def api_create_room(
|
||||
**result,
|
||||
}
|
||||
|
||||
|
||||
@app.post(
|
||||
"/search-room",
|
||||
summary="Search for a room",
|
||||
description="Searches for a room using its invite code.",
|
||||
)
|
||||
def api_search_room(
|
||||
room: RoomSearch,
|
||||
user_id: int = Depends(get_current_user),
|
||||
):
|
||||
room_name = search_room(
|
||||
room.invite_code,
|
||||
)
|
||||
|
||||
if room_name is None:
|
||||
return {
|
||||
"status": "failed",
|
||||
"reason": "room_not_found",
|
||||
}
|
||||
|
||||
return {
|
||||
"status": "found",
|
||||
"room_name": room_name,
|
||||
}
|
||||
|
||||
|
||||
@app.post(
|
||||
"/join-room",
|
||||
summary="Join a room",
|
||||
|
||||
Reference in New Issue
Block a user