Replace legacy checkBodyType with Zod

Start matchmaking integration
Start rooms API
Move existing room scene locations to roomtypes file
Auth checkExpired util for client refreshing
This commit is contained in:
2025-03-25 21:54:08 -04:00
parent de3d653446
commit 463e3ef71b
14 changed files with 287 additions and 110 deletions

View File

@@ -0,0 +1,26 @@
import { z } from "zod";
import { APIUtils } from "../../apiutils.ts";
import express from "express";
export const route = APIUtils.createRouter('/player');
interface BaseLoginLock {
LoginLock: string
}
const LoginSchema = z.object({
LoginLock: z.string().uuid("LoginLock must be a UUIDv4")
});
route.router.post('/login',
APIUtils.Authentication,
express.urlencoded({extended: true}),
APIUtils.validateRequestBody(LoginSchema),
(rq, rs) => {
// temporary
rs.sendStatus(200);
},
)