fix: use correct endpoint for city rooms on server-side

This commit is contained in:
Apple
2025-11-28 03:41:44 -08:00
parent cd48b32bb7
commit dfe63d1b78

View File

@@ -138,7 +138,9 @@ class ApiClient {
// City Rooms
async getCityRooms(): Promise<CityRoom[]> {
return this.fetch<CityRoom[]>('/api/city/rooms')
// Server-side: call backend directly, client-side: use proxy
const endpoint = typeof window === 'undefined' ? '/city/rooms' : '/api/city/rooms'
return this.fetch<CityRoom[]>(endpoint)
}
async getCityRoom(slug: string): Promise<CityRoom | null> {