Skip to content

Commit

Permalink
fix(useSurrealFetch): variable naming convention
Browse files Browse the repository at this point in the history
  • Loading branch information
sandros94 committed May 28, 2024
1 parent f936d02 commit d5f47ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/runtime/composables/surreal-fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { DatabasePreset, Overrides, Response } from '../types'
import { useFetch, useLazyFetch, useNuxtApp, useRuntimeConfig } from '#app'

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

return useFetch(url, {
return useFetch(endpoint, {
...opts,
$fetch: useNuxtApp().$surrealFetch,
})
}

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

return useLazyFetch(url, {
return useLazyFetch(endpoint, {
...opts,
$fetch: useNuxtApp().$surrealFetch,
})
Expand Down

0 comments on commit d5f47ee

Please sign in to comment.