Basic live service:

- Matchmaking
- Instance
- Presence (albeit empty atm)

Authentication fixes; differentiate between user and profile
Default auth timeout is now 3 hours
Add "operators" database key ("all users with operator permissions", or "developer" role set in token), add check in `Profile`
Fix default profile image filename reference when not set
account/me
Log hile reporting, do stuff with the report later ("Server" user for commands, operators can check reports)
Refresh login done by client automatically when token expires, requires extra work
This commit is contained in:
2025-03-24 21:50:22 -04:00
parent 31f9cfdc1a
commit 616f5dd619
12 changed files with 298 additions and 42 deletions

View File

@@ -0,0 +1,24 @@
import { APIUtils, NoBody } from "../../apiutils.ts";
import express from "express";
import Logging from "@proxnet/undead-logging";
const log = new Logging("PlayerReportingRoute");
export const route = APIUtils.createRouter("/PlayerReporting");
interface HileMessage {
Message: string;
}
route.router.post('/v1/hile',
APIUtils.Authentication,
express.json(),
APIUtils.checkBodyTypes<HileMessage>({Message: ""}),
(rq: express.Request<NoBody, NoBody, HileMessage>, rs) => {
rs.sendStatus(204);
log.w(`Client sent hile report: '${rq.body.Message}'`);
},
);