Maintenance mode activates after current draw completes
- When admin enables maintenance, it's set to 'pending' state - Maintenance activates automatically after the current draw completes - Admin can use immediate=true to force immediate activation - Frontend shows 'Maintenance Scheduled' banner when pending - Telegram bot warns users but still allows purchases when pending - Both mode and pending status tracked in system_settings table
This commit is contained in:
@@ -157,6 +157,16 @@ class ApiClient {
|
||||
return this.request(`/jackpot/past-wins?${params.toString()}`);
|
||||
}
|
||||
|
||||
async getMaintenanceStatus(): Promise<{ maintenance_mode: boolean; maintenance_pending: boolean; message: string | null }> {
|
||||
try {
|
||||
const response = await this.request<{ data: { maintenance_mode: boolean; maintenance_pending: boolean; message: string | null } }>('/status/maintenance');
|
||||
return response.data;
|
||||
} catch {
|
||||
// If endpoint doesn't exist or fails, assume not in maintenance
|
||||
return { maintenance_mode: false, maintenance_pending: false, message: null };
|
||||
}
|
||||
}
|
||||
|
||||
// Auth endpoints
|
||||
async nostrAuth(nostrPubkey: string, signedMessage: string, nonce: string) {
|
||||
return this.request('/auth/nostr', {
|
||||
|
||||
Reference in New Issue
Block a user