diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/src/server.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/src/server.ts b/server/src/server.ts index 1cb441b..0973518 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -21,8 +21,13 @@ export const runServer = async (ctx: Context): Promise<CleanupRoutine> => { ctx, db, async (dbChange: DatabaseChange) => { + const changeBuff = JSON.stringify(dbChange) + // TODO figure out if `client` cares about + // `dbChange` instead of just assuming that + // `client` cares because `subscribe` has been + // called at least once for (let client of wss.clients) { - client.send(JSON.stringify(dbChange)) + client.send(changeBuff) } } ) |