partial: user routes

This commit is contained in:
DecDuck
2025-08-10 10:19:45 +10:00
parent 80f7757558
commit a0b4381f0b
54 changed files with 545 additions and 410 deletions

View File

@ -5,6 +5,15 @@ import type { MinimumRequestObject } from "~/server/h3";
// ID to admin
const socketHeaders = new Map<string, MinimumRequestObject>();
/**
* WebSocket to listen to task updates.
*
* Sends "unauthenticated" if authentication failed.
*
* Use `connect/:taskId` to subscribe to a task.
*
* Sends JSON tasks for all tasks subscribed.
*/
export default defineWebSocketHandler({
async open(peer) {
const request = peer.request;