mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
Update branding.ts
This commit is contained in:
@@ -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
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user