chore: migrate AdminShuttles and old API endpoints from Axios/Render to Supabase client, remove Axios

This commit is contained in:
2026-02-26 14:51:03 -05:00
parent 30c3f092d8
commit 35a29fbb0f
9 changed files with 69 additions and 175 deletions

View File

@ -3,9 +3,7 @@ import { ref, computed, onMounted } from 'vue'
import { useRouter } from 'vue-router'
import { useI18n } from 'vue-i18n'
import { useFavoritesStore } from '@/stores/favorites'
import { SUPABASE_URL } from '@/supabase'
const API_URL = import.meta.env.VITE_API_URL || 'http://localhost:8000';
import { getImageUrl as utilGetImageUrl } from '@/utils/imageUrl'
const { t } = useI18n()
const router = useRouter()
@ -26,9 +24,7 @@ onMounted(async () => {
})
function getImageUrl(path?: string) {
if (!path) return `https://ui-avatars.com/api/?name=Favorito&background=fee715&color=101820&bold=true`
if (path.startsWith('http')) return path
return `${API_URL}${path.startsWith('/') ? '' : '/'}${path}`
return utilGetImageUrl(path, 'business')
}
async function removeFavorite(event: Event, itemType: string, itemId: string) {