Files
rustfs-console/composables/useAPI.ts
T
overtrue 6ab024be1c style: format code with Prettier
- Auto-format all files to comply with Prettier rules
- Fix code style issues in 545 files
2025-11-01 00:03:01 +08:00

9 lines
238 B
TypeScript

import type { UseFetchOptions } from 'nuxt/app'
export function useAPI<T>(url: string | (() => string), options?: UseFetchOptions<T>) {
return useFetch(url, {
...options,
$fetch: useNuxtApp().$apiFetch as typeof $fetch,
})
}