feat(web): remove scan-schedule admin UI (scheduler retired)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -383,43 +383,6 @@ export function createCoverProvidersQuery() {
|
||||
});
|
||||
}
|
||||
|
||||
// Scan schedule -----------------------------------------------------------
|
||||
|
||||
export type ScanScheduleMode = 'off' | 'interval' | 'daily' | 'weekly';
|
||||
|
||||
export type ScanSchedule = {
|
||||
mode: ScanScheduleMode;
|
||||
interval_hours: number | null;
|
||||
time_of_day: string | null; // 'HH:MM'
|
||||
weekly_day: number | null; // 1..7 (Mon..Sun, ISO 8601)
|
||||
next_scheduled_at: string | null; // RFC3339 ISO timestamp; null when mode='off'
|
||||
};
|
||||
|
||||
export type ScanScheduleUpdate = {
|
||||
mode: ScanScheduleMode;
|
||||
interval_hours?: number | null;
|
||||
time_of_day?: string | null;
|
||||
weekly_day?: number | null;
|
||||
};
|
||||
|
||||
export async function getScanSchedule(): Promise<ScanSchedule> {
|
||||
return api.get<ScanSchedule>('/api/admin/scan/schedule');
|
||||
}
|
||||
|
||||
export async function updateScanSchedule(patch: ScanScheduleUpdate): Promise<ScanSchedule> {
|
||||
return api.patch<ScanSchedule>('/api/admin/scan/schedule', patch);
|
||||
}
|
||||
|
||||
// Settings rarely change in operator time. 60s staleTime; refetches
|
||||
// on window focus + after any PATCH invalidation — no polling.
|
||||
export function createScanScheduleQuery() {
|
||||
return createQuery({
|
||||
queryKey: qk.scanSchedule(),
|
||||
queryFn: getScanSchedule,
|
||||
staleTime: 60_000
|
||||
});
|
||||
}
|
||||
|
||||
// Admin user-management ------------------------------------------------------
|
||||
|
||||
export type AdminUser = {
|
||||
|
||||
Reference in New Issue
Block a user