From eb719a5416391521d536980e974f97b7ac8b78e3 Mon Sep 17 00:00:00 2001 From: "Alex Pooley (@zuedev)" Date: Fri, 24 Jul 2026 20:06:17 +0100 Subject: stats page --- 174bg/database/volumes/pocketbase/pb_hooks/stats.pb.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 174bg/database/volumes/pocketbase/pb_hooks/stats.pb.js (limited to '174bg/database/volumes/pocketbase/pb_hooks/stats.pb.js') diff --git a/174bg/database/volumes/pocketbase/pb_hooks/stats.pb.js b/174bg/database/volumes/pocketbase/pb_hooks/stats.pb.js new file mode 100644 index 0000000..e2b6ab3 --- /dev/null +++ b/174bg/database/volumes/pocketbase/pb_hooks/stats.pb.js @@ -0,0 +1,14 @@ +routerAdd("get", "/stats", (e) => { + const heartbeat = $http.send({ + url: "https://db.174bg.net/api/heartbeat", + headers: { "content-type": "application/json" } + }) + + return e.html(200, $template.loadFiles( + `${__hooks}/views/_layout.html`, + `${__hooks}/views/stats.html`, + ).render({ + "timeDifference": heartbeat.json.timeDifference, + "withinThreshold": heartbeat.json.withinThreshold, + })) +}) \ No newline at end of file -- cgit v1.2.3