my power's back
All checks were successful
Galvanic Corrosion Cross-Compile / build (push) Successful in 1m57s
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:
@@ -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.")
|
||||
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user