diff --git a/utils/github.ts b/utils/github.ts index 9bb29da..4ca9876 100644 --- a/utils/github.ts +++ b/utils/github.ts @@ -5,7 +5,7 @@ const runtimeConfig = useRuntimeConfig(); const commonCacheOptions: CacheOptions = { group: "gh", - swr: true, + swr: false, maxAge: 60 * 60 * 6, // 6 hours staleMaxAge: 60 * 60 * 12, // 12 hours }; @@ -16,8 +16,8 @@ const cacheOptions = (name: string): CacheOptions => ({ }); export const ghFetch = cachedFunction( - (url: string, opts: FetchOptions = {}) => { - return $fetch(url, { + (url: string, opts: FetchOptions = {}) => { + return $fetch(url, { baseURL: "https://api.github.com", ...opts, method: (opts.method || "GET").toUpperCase() as any,