Files
goose/ui/desktop/src/config.ts
2025-05-30 12:06:49 -07:00

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') || '');
};