20% battery left

This commit is contained in:
Dreamgineer
2025-11-18 16:24:00 -05:00 Unverified
parent 27b8336295
commit fb031da1ef
19 changed files with 262 additions and 74 deletions
+4 -4
View File
@@ -3,10 +3,6 @@ import { sse } from "@/lib/utils";
const VERSION = crypto.randomUUID();
export function GET({ signal }: Request) {
sse.publish(VERSION, {
topic: "active",
event: "version",
});
// +1 because this connection is not yet counted
sse.publish(sse.count("active") + 1, {
topic: "active",
@@ -18,6 +14,10 @@ export function GET({ signal }: Request) {
// no need to -1 because this connection is already removed
sse.publish(sse.count("active"), { topic: "active", event: "count" });
},
motd: {
data: VERSION,
event: "version",
},
signal,
});
}