feat: notify ws clients on rundown changes (#327)

This commit is contained in:
Carlos Valente
2023-04-05 21:42:18 +02:00
committed by GitHub
parent cb39a13bea
commit 0a68377b82
2 changed files with 19 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
import { socket } from './WebsocketAdapter.js';
/**
* Utility function to notify clients that the REST data is stale
* @param payload -- possible patch payload
*/
export function sendRefetch(payload: any | null = null) {
socket.send({
type: 'ontime-refetch',
payload,
});
}