Update branding.ts

This commit is contained in:
Egor
2026-01-19 10:19:04 +03:00
committed by GitHub
parent 75daacfeac
commit 02303bdff9

View File

@@ -7,6 +7,10 @@ export interface BrandingInfo {
has_custom_logo: boolean
}
export interface AnimationEnabled {
enabled: boolean
}
export const brandingApi = {
// Get current branding (public, no auth required)
getBranding: async (): Promise<BrandingInfo> => {
@@ -45,4 +49,16 @@ export const brandingApi = {
}
return `${import.meta.env.VITE_API_URL || ''}${branding.logo_url}`
},
// Get animation enabled (public, no auth required)
getAnimationEnabled: async (): Promise<AnimationEnabled> => {
const response = await apiClient.get<AnimationEnabled>('/cabinet/branding/animation')
return response.data
},
// Update animation enabled (admin only)
updateAnimationEnabled: async (enabled: boolean): Promise<AnimationEnabled> => {
const response = await apiClient.patch<AnimationEnabled>('/cabinet/branding/animation', { enabled })
return response.data
},
}