mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-04 02:32:57 +00:00
19 lines
511 B
TypeScript
19 lines
511 B
TypeScript
import api from '../../services/api';
|
|
|
|
export type PrefetchStatus = {
|
|
lastUpdated?: string;
|
|
intervalMinutes: number;
|
|
fastMode: boolean;
|
|
nextApproximate: string;
|
|
};
|
|
|
|
export async function getPrefetchStatus(): Promise<PrefetchStatus> {
|
|
const { data } = await api.get('/admin/prefetch/status');
|
|
return data as PrefetchStatus;
|
|
}
|
|
|
|
export async function triggerPrefetch(): Promise<{ message: string }>{
|
|
const { data } = await api.post('/admin/prefetch/trigger');
|
|
return data as { message: string };
|
|
}
|