Skip to content

Commit

Permalink
add default args to client function
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOnlyTails committed Mar 6, 2024
1 parent 1f7a925 commit 93c335c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/src/lib/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import type { AppType } from "$server";

export const client = (args?: {
baseUrl?: string;
fetch?: typeof fetch;
fetch?: typeof global["fetch"];
}) => {
const { baseUrl, fetch } = args;
const { baseUrl = "https://api.linku.la", fetch = global.fetch } = args;
return hc<AppType>(baseUrl, {
fetch
});
Expand Down

0 comments on commit 93c335c

Please sign in to comment.