Qassure-frontend/src/services/theme-service.ts

22 lines
640 B
TypeScript

import apiClient from './api-client';
export interface ThemeResponse {
success: boolean;
data: {
id: string;
name: string;
logo_file_path: string | null; // This will be a full URL from the API
favicon_file_path: string | null; // This will be a full URL from the API
primary_color: string | null;
secondary_color: string | null;
accent_color: string | null;
};
}
export const themeService = {
getTheme: async (domain: string): Promise<ThemeResponse> => {
const response = await apiClient.get<ThemeResponse>(`/tenants/theme?domain=${encodeURIComponent(domain)}`);
return response.data;
},
};