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:
24
src/routes/api/PlayerReporting.ts
Normal file
24
src/routes/api/PlayerReporting.ts
Normal 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}'`);
|
||||
},
|
||||
|
||||
);
|
||||
Reference in New Issue
Block a user