We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1f9ae75 commit 46edc12Copy full SHA for 46edc12
1 file changed
frontend/src/api.ts
@@ -1,4 +1,5 @@
1
-export const API_BASE_URL = import.meta.env.VITE_API_BASE_URL as string;
+const rawBase = import.meta.env.VITE_API_BASE_URL;
2
+export const API_BASE_URL = (rawBase ? String(rawBase) : "").replace(/\/+$/, "");
3
4
export type ServiceInstance = {
5
id: number;
@@ -32,4 +33,4 @@ export async function createService(input: {
32
33
}
34
35
return res.json();
-}
36
+}
0 commit comments