This commit is contained in:
Nadar
2026-03-17 13:24:22 +03:00
commit 82e5ac9d81
554 changed files with 29637 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import type { NitroFetchRequest } from 'nitropack'
export function $api<
T = unknown,
R extends NitroFetchRequest = NitroFetchRequest,
>(
request: Parameters<typeof $fetch<T, R>>[0],
options?: Partial<Parameters<typeof $fetch<T, R>>[1]>,
) {
const runtimeConfig = useRuntimeConfig()
return $fetch<T, R>(request, {
...options,
retry: false,
baseURL: runtimeConfig.public.apiHost as string,
})
}