* APIUtils addition: query validation * Coach and Server accounts are now properly created if they do not exist * Profiles now cannot be IDs 1 or 2 (reservedIds) * Fixed profile username exists bug * Added relationship manager * Started relationship management * DeviceClass and VRMovementMode enum defaults for reserved profiles * Presence update simplification * Progression fixes * Relationship query and object fixes * Base configuration is now rate limited * Progression route no longer requires authentication, instead is rate limited * Base relationships with reserved profiles (Coach and Server) * DeviceClass required for login * Get presence route * Socket route no longer logs * Socket target base finished
20 lines
538 B
TypeScript
20 lines
538 B
TypeScript
import { APIUtils } from "../../apiutils.ts";
|
|
import { GameConfigs } from "../../data/config.ts";
|
|
|
|
export const route = APIUtils.createRouter("/config");
|
|
|
|
const rateLimit = new APIUtils.RateLimiter(60, 2);
|
|
|
|
route.router.get("/v2", rateLimit.middle(), (_rq, rs) => {
|
|
const config = GameConfigs.getConfig();
|
|
if (config == null) rs.sendStatus(500);
|
|
else rs.json(config);
|
|
});
|
|
|
|
route.router.get('/v1/amplitude',
|
|
APIUtils.setCacheAllowed,
|
|
rateLimit.middle(),
|
|
(_rq, rs) => {
|
|
rs.json({AmplitudeKey: ""});
|
|
}
|
|
); |