Configure Docker publishing with correct GitHub username

This commit is contained in:
Tomas Dvorak
2026-02-27 17:34:20 +01:00
parent 4c812e376d
commit 0a80ecd9f7
138 changed files with 12130 additions and 7831 deletions
+20
View File
@@ -0,0 +1,20 @@
const DEFAULT_API_ORIGIN = 'http://localhost:8080';
const trimTrailingSlash = (value: string): string => value.replace(/\/+$/, '');
const trimApiSuffix = (value: string): string => value.replace(/\/api\/v1$/, '');
export const getApiOrigin = (): string => {
const raw = (import.meta.env.VITE_API_URL as string | undefined)?.trim();
if (!raw) {
return DEFAULT_API_ORIGIN;
}
const normalized = trimTrailingSlash(raw);
return trimApiSuffix(normalized);
};
export const getApiV1BaseUrl = (): string => {
const origin = getApiOrigin();
return `${origin}/api/v1`;
};