diff --git a/src/runtime/composables/surreal-fetch.ts b/src/runtime/composables/surreal-fetch.ts index 73dc791..95e228b 100644 --- a/src/runtime/composables/surreal-fetch.ts +++ b/src/runtime/composables/surreal-fetch.ts @@ -5,7 +5,7 @@ import type { DatabasePreset, Overrides, Response } from '../types' import { useFetch, useLazyFetch, useNuxtApp, useRuntimeConfig } from '#app' export function useSurrealFetch( - url: MaybeRefOrGetter, + endpoint: MaybeRefOrGetter, options: UseFetchOptions> & Overrides = {}, ) { const { @@ -44,14 +44,14 @@ export function useSurrealFetch( } : undefined - return useFetch(url, { + return useFetch(endpoint, { ...opts, $fetch: useNuxtApp().$surrealFetch, }) } export function useSurrealLazyFetch( - url: MaybeRefOrGetter, + endpoint: MaybeRefOrGetter, options: UseFetchOptions> & Overrides = {}, ) { const { @@ -90,7 +90,7 @@ export function useSurrealLazyFetch( } : undefined - return useLazyFetch(url, { + return useLazyFetch(endpoint, { ...opts, $fetch: useNuxtApp().$surrealFetch, })