ritzenbergenlib.ts Hartkodierung entfernt

This commit is contained in:
R40fendt
2025-12-24 15:40:20 +01:00
parent 335a25a8f4
commit acb48b463e

View File

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