From fd1332a3df191577e91c6d846a8b5db1747099fd Mon Sep 17 00:00:00 2001 From: Zach Berwaldt Date: Fri, 15 Mar 2024 22:00:10 -0400 Subject: cleanup --- fe/src/utils.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'fe/src/utils.ts') diff --git a/fe/src/utils.ts b/fe/src/utils.ts index e78556c..9fddf41 100644 --- a/fe/src/utils.ts +++ b/fe/src/utils.ts @@ -7,3 +7,8 @@ export function processFormInput(form: HTMLFormElement) { } return data; } + +export function apiURL (path: string): string { + const baseUrl = import.meta.env?.VITE_API_BASE_URL ?? "http://localhost:8080/api/v1"; + return `${baseUrl}${path}` +} -- cgit v1.1