diff --git a/app/api/locations/route.ts b/app/api/locations/route.ts index c6b4b35..93b4556 100644 --- a/app/api/locations/route.ts +++ b/app/api/locations/route.ts @@ -1,12 +1,12 @@ import { NextRequest, NextResponse } from 'next/server' -import { supabaseAdmin } from '@/lib/supabase/admin' +import { supabase } from '@/lib/supabase/client' /** * @description Retrieves all active locations */ export async function GET(request: NextRequest) { try { - const { data: locations, error } = await supabaseAdmin + const { data: locations, error } = await supabase .from('locations') .select('*') .eq('is_active', true) diff --git a/app/api/services/route.ts b/app/api/services/route.ts index c78c385..12d3a85 100644 --- a/app/api/services/route.ts +++ b/app/api/services/route.ts @@ -1,5 +1,5 @@ import { NextRequest, NextResponse } from 'next/server' -import { supabaseAdmin } from '@/lib/supabase/admin' +import { supabase } from '@/lib/supabase/client' /** * @description Retrieves active services, optionally filtered by location @@ -9,7 +9,7 @@ export async function GET(request: NextRequest) { const { searchParams } = new URL(request.url) const locationId = searchParams.get('location_id') - let query = supabaseAdmin + let query = supabase .from('services') .select('id, name, description, duration_minutes, base_price, requires_dual_artist, premium_fee_enabled, category, is_active, created_at, updated_at') .eq('is_active', true)