mirror of
https://github.com/aljazceru/goose.git
synced 2026-02-17 20:44:23 +01:00
14 lines
461 B
TypeScript
14 lines
461 B
TypeScript
// Helper to construct API endpoints
|
|
export const getApiUrl = (endpoint: string): string => {
|
|
const baseUrl =
|
|
String(window.appConfig.get('GOOSE_API_HOST') || '') +
|
|
':' +
|
|
String(window.appConfig.get('GOOSE_PORT') || '');
|
|
const cleanEndpoint = endpoint.startsWith('/') ? endpoint : `/${endpoint}`;
|
|
return `${baseUrl}${cleanEndpoint}`;
|
|
};
|
|
|
|
export const getSecretKey = (): string => {
|
|
return String(window.appConfig.get('secretKey') || '');
|
|
};
|