Release v0.1.19 2026-07-19
This commit is contained in:
@@ -7,6 +7,7 @@ const SESSION_LIFETIME_MS = 30 * 24 * 60 * 60 * 1000;
|
||||
const MAX_JSON_BYTES = 1024 * 1024;
|
||||
const AUTH_WINDOW_MS = 15 * 60 * 1000;
|
||||
const AUTH_ATTEMPTS_PER_WINDOW = 20;
|
||||
const HOCKEY_PVP_COUNTDOWN_MS = 5_000;
|
||||
const authAttempts = new Map();
|
||||
|
||||
function apiError(message, status = 400) {
|
||||
@@ -650,6 +651,7 @@ export function createGameApiHandler(options = {}) {
|
||||
match: {
|
||||
id: match.id,
|
||||
seed: match.seed,
|
||||
countdownEndsAtMs: match.countdownEndsAtMs,
|
||||
opponentName: opponent.hunterName,
|
||||
role: ticket.side,
|
||||
},
|
||||
@@ -693,6 +695,7 @@ export function createGameApiHandler(options = {}) {
|
||||
id: matchId,
|
||||
seed: randomBytes(4).readUInt32BE(0) || 1,
|
||||
createdAt: now,
|
||||
countdownEndsAtMs: now + HOCKEY_PVP_COUNTDOWN_MS,
|
||||
players: { host: opponent, guest: ticket },
|
||||
snapshots: { host: null, guest: null },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user