11 lines
275 B
TypeScript
11 lines
275 B
TypeScript
|
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
|