This commit is contained in:
2025-11-30 13:37:19 +01:00
parent 665f0d1454
commit de2692f704
9 changed files with 50 additions and 122 deletions

View File

@@ -4,12 +4,12 @@ export default defineNuxtPlugin(() => {
const config = useRuntimeConfig()
const api = $fetch.create({
baseURL: config.public.apiBase,/*"http://192.168.1.227:3100" "https://backend.fedeo.io"*/
baseURL: config.public.apiBase,
credentials: "include",
async onRequest({options}) {
// Token aus Cookie holen
let token: string | null | undefined = ""
if (await useCapacitor().getIsNative()) {
if (useCapacitor().getIsNative()) {
const {value} = await Preferences.get({key: 'token'});
token = value
} else {