fix(composables): remove jwt auth header from useApiFetch
implementation
it made things worse
This commit is contained in:
parent
519772fd88
commit
b4e8894291
@ -2,13 +2,13 @@ import { StorageSerializers } from "@vueuse/core";
|
|||||||
import { UseFetchOptions } from "nuxt/app";
|
import { UseFetchOptions } from "nuxt/app";
|
||||||
|
|
||||||
const useApiFetch = async <T>(url: string, options?: any) => {
|
const useApiFetch = async <T>(url: string, options?: any) => {
|
||||||
const { token } = useAuth();
|
// const { token } = useAuth();
|
||||||
let head = {
|
let head = {
|
||||||
...(options?.headers || {}),
|
...(options?.headers || {}),
|
||||||
};
|
};
|
||||||
if (token.value) {
|
// if (token.value) {
|
||||||
head.Authorization = token.value;
|
// head.Authorization = token.value;
|
||||||
}
|
// }
|
||||||
/* const cached = useSessionStorage<T>(url, null, {
|
/* const cached = useSessionStorage<T>(url, null, {
|
||||||
serializer: StorageSerializers.object,
|
serializer: StorageSerializers.object,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user