diff --git a/api/src/lib/client.ts b/api/src/lib/client.ts index d36fcb6f07..310d05940e 100644 --- a/api/src/lib/client.ts +++ b/api/src/lib/client.ts @@ -1,15 +1,14 @@ import { hc } from "hono/client"; import type { AppType } from "$server"; -export const client = ({ - baseUrl = "https://api.linku.la/", - fetchFunc = fetch, -}: { - baseUrl: string; - fetchFunc: typeof fetch; -}) => - hc(baseUrl, { - fetch: fetchFunc, +export const client = (args?: { + baseUrl?: string; + fetch?: typeof fetch; +}) => { + const { baseUrl, fetch } = args; + return hc(baseUrl, { + fetch }); +}; export type ApiType = AppType;