my power's back
All checks were successful
Galvanic Corrosion Cross-Compile / build (push) Successful in 1m57s

* Steam authentication
* Profile events
* Objective fixes for some rooms (reccenter, goldentrophy, etc)
* Profile meta (displayname) somewhat works
* Player socket subscriptions
This commit is contained in:
2025-05-04 02:25:09 -04:00
parent fe29602f4a
commit 9e4bfc8368
23 changed files with 400 additions and 79 deletions

View File

@@ -103,12 +103,25 @@ route.router.get("/me",
);
route.router.post("/me/displayname",
interface DisplayNameUpdate {
displayName: string
}
const DisplayNameUpdateSchema = z.object({
displayName: z.string().max(24, "DisplayName too long!")
})
route.router.put("/me/displayname",
APIUtils.Authentication,
APIUtils.AuthenticationType(AuthType.Game),
express.urlencoded({ extended: true }),
APIUtils.validateRequestBody(DisplayNameUpdateSchema),
(rq: express.Request<{}, {}, DisplayNameUpdate>, rs: express.Response, nxt: express.NextFunction) => {
rs.locals.profile.setDisplayName(rq.body.displayName);
nxt();
},
APIUtils.RecNetResponse(true, "DisplayName customization is not yet implemented."),
APIUtils.RecNetResponse(true, "Updated DisplayName.")
);