Skip to content

Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.

571 B
Raw Blame
import { useEntryApi, useEntryFetch } from '#gallery/composables/useEntryApi'
/** Create a console transport bound to the current Site/account and entry API origin. */
export function useConsoleApi() {
  return useEntryApi(useRuntimeConfig().public.console.apiBase)
}
/** Preserve useFetch response inference while applying console transport and scope keys. */
export const useConsoleFetch = ((
  request: unknown,
  options?: Record<string, unknown>,
) =>
  useEntryFetch(
    request,
    options,
    useRuntimeConfig().public.console.apiBase,
  )) as typeof useFetch