mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 12:53:32 +00:00
refactor: simplify messages
This commit is contained in:
committed by
Carlos Valente
parent
ae061cb69a
commit
54f07c4330
@@ -208,7 +208,7 @@ export const startServer = async (): Promise<{ message: string; serverPort: numb
|
||||
playback: SimplePlayback.Stop,
|
||||
direction: SimpleDirection.CountDown,
|
||||
},
|
||||
ping: -1,
|
||||
ping: 1,
|
||||
});
|
||||
|
||||
// initialise rundown service
|
||||
|
||||
@@ -23,7 +23,7 @@ export const eventStore = {
|
||||
},
|
||||
set<T extends keyof RuntimeStore>(key: T, value: RuntimeStore[T]) {
|
||||
store[key] = value;
|
||||
socket.sendAsJson(MessageTag.RuntimePatch, { [key]: value });
|
||||
socket.sendAsJson(MessageTag.RuntimeData, { [key]: value });
|
||||
},
|
||||
createBatch() {
|
||||
const patch: Partial<RuntimeStore> = {};
|
||||
@@ -34,7 +34,7 @@ export const eventStore = {
|
||||
send() {
|
||||
if (isEmptyObject(patch)) return;
|
||||
store = { ...store, ...patch };
|
||||
socket.sendAsJson(MessageTag.RuntimePatch, patch);
|
||||
socket.sendAsJson(MessageTag.RuntimeData, patch);
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user