Files
ontime/apps/server/src/adapters/websocketAux.ts
T
2025-06-09 14:12:57 +02:00

18 lines
369 B
TypeScript

import { socket } from './WebsocketAdapter.js';
export enum RefetchTargets {
Rundown = 'rundown',
Report = 'report',
}
/**
* Utility function to notify clients that the REST data is stale
* @param payload -- possible patch payload
*/
export function sendRefetch(payload: unknown = null) {
socket.sendAsJson({
type: 'ontime-refetch',
payload,
});
}