diff --git a/src/api/branding.ts b/src/api/branding.ts index c0f6e02..d1f35e6 100644 --- a/src/api/branding.ts +++ b/src/api/branding.ts @@ -15,6 +15,10 @@ export interface FullscreenEnabled { enabled: boolean } +export interface EmailAuthEnabled { + enabled: boolean +} + const BRANDING_CACHE_KEY = 'cabinet_branding' const LOGO_PRELOADED_KEY = 'cabinet_logo_preloaded' @@ -157,4 +161,21 @@ export const brandingApi = { const response = await apiClient.patch('/cabinet/branding/fullscreen', { enabled }) return response.data }, + + // Get email auth enabled (public, no auth required) + getEmailAuthEnabled: async (): Promise => { + try { + const response = await apiClient.get('/cabinet/branding/email-auth') + return response.data + } catch { + // If endpoint doesn't exist, default to enabled + return { enabled: true } + } + }, + + // Update email auth enabled (admin only) + updateEmailAuthEnabled: async (enabled: boolean): Promise => { + const response = await apiClient.patch('/cabinet/branding/email-auth', { enabled }) + return response.data + }, }