Skip to content

Commit cf60f4d

Browse files
committed
respect API_URL
1 parent 88faaf6 commit cf60f4d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/platform-api.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import type { Submission, User } from "./types.d.tsx";
22

33
type fetchT = typeof fetch;
4+
const API_URL = Deno.env.get("API_URL")
45

56
async function baseFetch(fetch: fetchT, route: string): Promise<any> {
6-
return await fetch(`${"https://platform.modfest.net"}/${route}`)
7+
return await fetch(`${API_URL ?? "https://platform.modfest.net"}/${route}`)
78
.then((response) => response.json())
89
.catch((error) => {
910
console.error(error);

0 commit comments

Comments
 (0)