diff --git a/src/ritzenbergenlib.ts b/src/ritzenbergenlib.ts index cc065a7..2b47554 100644 --- a/src/ritzenbergenlib.ts +++ b/src/ritzenbergenlib.ts @@ -1,5 +1,8 @@ import $ from "jquery"; import { ref } from "vue"; + +const apiBaseUrl = import.meta.env.VITE_BACKEND_URL; + class User { public username: string; public kuerzel: string; @@ -44,8 +47,8 @@ class RitzenbergenLib { } static api(path: string) { if (path.startsWith("/")) - return "http://192.168.188.38/Jonas/ritzenbergenapi" + path; - else return "http://192.168.188.38/Jonas/ritzenbergenapi/" + path; + return apiBaseUrl + path; + else return apiBaseUrl+"/" + path; } }