update endopoints
This commit is contained in:
1 parent
f43c32c72b
commit
80e46c09a3
2 files changed
+15
-21
No files matched your search
+14
-2
@@ -133,8 +133,20 @@ def get_rooms(user_id):
|
||||
)
|
||||
|
||||
return rooms
|
||||
|
||||
|
||||
def delete_room(room_id):
|
||||
room = execute(
|
||||
"""
|
||||
SELECT id
|
||||
FROM rooms
|
||||
WHERE id = ?
|
||||
""",
|
||||
(room_id,)
|
||||
)
|
||||
|
||||
if not room:
|
||||
return {"error": "room not found"}
|
||||
|
||||
execute(
|
||||
"""
|
||||
DELETE FROM rooms
|
||||
@@ -143,7 +155,7 @@ def delete_room(room_id):
|
||||
(room_id,)
|
||||
)
|
||||
|
||||
return {"status":"deleted"}
|
||||
return {"status": "deleted"}
|
||||
|
||||
def get_room(room_id, user_id):
|
||||
|
||||
|
||||
Reference in new issue
Block a user