Mobile
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user