fix: Remove non-existent owner_type/owner_id columns from city_rooms queries

- Fix get_all_rooms() to not select owner_type/owner_id
- Fix get_city_rooms_for_list() to not select owner_type/owner_id
- Fix get_city_rooms_api() to use space_scope instead of owner_type
- This fixes 500 error on /api/city/rooms endpoint
This commit is contained in:
Apple
2025-12-05 02:52:03 -08:00
parent ad3026e32d
commit 72b76bf29f
2 changed files with 3 additions and 3 deletions

View File

@@ -69,7 +69,7 @@ async def get_all_rooms(limit: int = 100, offset: int = 0) -> List[dict]:
query = """
SELECT
cr.id, cr.slug, cr.name, cr.description,
cr.room_type, cr.owner_type, cr.owner_id, cr.space_scope, cr.visibility,
cr.room_type, cr.space_scope, cr.visibility,
cr.is_default, cr.is_public, cr.sort_order,
cr.created_at, cr.created_by,
cr.matrix_room_id, cr.matrix_room_alias,
@@ -92,7 +92,7 @@ async def get_city_rooms_for_list(limit: int = 100) -> List[dict]:
query = """
SELECT
cr.id, cr.slug, cr.name, cr.description,
cr.room_type, cr.owner_type, cr.owner_id, cr.space_scope, cr.visibility,
cr.room_type, cr.space_scope, cr.visibility,
cr.is_public, cr.sort_order,
cr.matrix_room_id, cr.matrix_room_alias,
cr.logo_url, cr.banner_url,