diff --git a/composables/useApiFetch.ts b/composables/useApiFetch.ts new file mode 100644 index 0000000..c125c15 --- /dev/null +++ b/composables/useApiFetch.ts @@ -0,0 +1,11 @@ +import { UseFetchOptions } from "nuxt/app"; + +const useApiFetch = async (url: string, options?: any) => { + const at = useCookie("rockfic_cookie", {default: undefined}) + return useFetch("/api" + url, { + method: "get", + ...options, + }) +} + +export default useApiFetch \ No newline at end of file