mirror of
https://github.com/rustfs/console.git
synced 2026-10-31 03:52:11 +08:00
- Auto-format all files to comply with Prettier rules - Fix code style issues in 545 files
9 lines
238 B
TypeScript
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,
|
|
})
|
|
}
|