feat(front): aligner api platform et sessions [INV-20260111-02]

This commit is contained in:
2026-01-11 17:14:24 +01:00
parent 936a73fde3
commit e99f053233
17 changed files with 346 additions and 67 deletions

View File

@@ -2,7 +2,10 @@ import { useState, useRequestHeaders, useRuntimeConfig } from '#imports'
const buildUrl = (path) => {
const config = useRuntimeConfig()
const base = config.public.apiBaseUrl?.replace(/\/$/, '') || ''
const baseUrl = process.server
? (config.apiBaseUrl || config.public.apiBaseUrl || '')
: (config.public.apiBaseUrl || '')
const base = baseUrl.replace(/\/$/, '')
return `${base}${path}`
}