Fix?
All checks were successful
Build and Deploy Nuxt / build (push) Successful in 42s

This commit is contained in:
2026-06-12 00:12:30 +02:00
parent 142d655d84
commit 9b7751c571
4 changed files with 16 additions and 6 deletions

View File

@@ -1,9 +1,13 @@
// composables/useApi.js
import { ref } from 'vue'
function normalizeUrl(url: string): string {
return url.replace(/\/+$/, '')
}
export default function useApi() {
const config = useRuntimeConfig()
const baseUrl = config.public.apiBaseUrl
const baseUrl = `${normalizeUrl(config.public.apiBaseUrl)}/api`
// Generic GET request
const get = async (endpoint) => {