diff --git a/src/lib/supabase.ts b/src/lib/supabase.ts deleted file mode 100644 index 90eab0c..0000000 --- a/src/lib/supabase.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { createClient } from '@supabase/supabase-js'; - -const supabaseUrl = import.meta.env.VITE_SUPABASE_URL || ''; -const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY || ''; - -export const supabase = createClient(supabaseUrl, supabaseAnonKey); diff --git a/src/services/reviewService.ts b/src/services/reviewService.ts index 8219739..d004496 100644 --- a/src/services/reviewService.ts +++ b/src/services/reviewService.ts @@ -1,5 +1,3 @@ -import { supabase } from '@/lib/supabase'; - const API_BASE_URL = 'https://karibeo.lesoluciones.net:8443/api'; export interface Review { @@ -42,8 +40,8 @@ export interface ReviewStats { class ReviewService { private async getAuthToken(): Promise { - const { data: { session } } = await supabase.auth.getSession(); - return session?.access_token || null; + // Get token from localStorage or your preferred auth method + return localStorage.getItem('auth_token'); } async getReviews(itemId?: string): Promise { diff --git a/src/services/tourismService.ts b/src/services/tourismService.ts index a0cb772..73e105e 100644 --- a/src/services/tourismService.ts +++ b/src/services/tourismService.ts @@ -1,5 +1,3 @@ -import { supabase } from '@/lib/supabase'; - const API_BASE_URL = 'https://karibeo.lesoluciones.net:8443/api'; export interface TourismOffer { @@ -50,8 +48,8 @@ export interface TourBooking { class TourismService { private async getAuthToken(): Promise { - const { data: { session } } = await supabase.auth.getSession(); - return session?.access_token || null; + // Get token from localStorage or your preferred auth method + return localStorage.getItem('auth_token'); } async getTourismOffers(filters?: {