proper SSE handling

This commit is contained in:
Darius
2026-02-05 23:51:17 +01:00
parent 40c8f144b5
commit 7ef755f120

View File

@@ -24,9 +24,10 @@ export async function sseRoutes(
reply.sse.keepAlive(); reply.sse.keepAlive();
const clientId = randomUUID(); const clientId = randomUUID();
const sendEvent = (data: SseEvent) => { const sendEvent = (event: SseEvent) => {
reply.sse.send({ reply.sse.send({
data: data, event: event.type,
data: event.data,
}); });
}; };