Skip to content

Commit

Permalink
fix(useSurrealFetch): support MaybeReforGetter url
Browse files Browse the repository at this point in the history
  • Loading branch information
sandros94 committed May 28, 2024
1 parent 6547eaa commit f936d02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/runtime/composables/surreal-fetch.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { UseFetchOptions } from 'nuxt/app'
import { ref } from 'vue'
import { type MaybeRefOrGetter, ref } from 'vue'

import type { DatabasePreset, Overrides, Response } from '../types'
import { useFetch, useLazyFetch, useNuxtApp, useRuntimeConfig } from '#app'

export function useSurrealFetch<T>(
url: string | (() => string),
url: MaybeRefOrGetter<string>,
options: UseFetchOptions<Response<T>> & Overrides = {},
) {
const {
Expand Down Expand Up @@ -51,7 +51,7 @@ export function useSurrealFetch<T>(
}

export function useSurrealLazyFetch<T>(
url: string | (() => string),
url: MaybeRefOrGetter<string>,
options: UseFetchOptions<Response<T>> & Overrides = {},
) {
const {
Expand Down

0 comments on commit f936d02

Please sign in to comment.