diff --git a/composables/useApiFetch.ts b/composables/useApiFetch.ts index bc336bf..49f60a9 100644 --- a/composables/useApiFetch.ts +++ b/composables/useApiFetch.ts @@ -1,13 +1,13 @@ import { AsyncData } from "#app"; const useApiFetch = async (url: string, options?: any) => { - // const { token } = useAuth(); + const { token } = useAuth(); let head = { ...(options?.headers || {}), }; - // if (token.value) { - // head.Authorization = token.value; - // } + if (token.value) { + head.Authorization = token.value; + } /* const cached = useSessionStorage(url, null, { serializer: StorageSerializers.object, });