Fix: Default portsNeeded to 1 for game containers

Game containers always need at least 1 port for backend connectivity to Velocity proxy. Without this default, game provisioning skips port allocation entirely, breaking EdgePublisher and Velocity registration.
This commit is contained in:
jester 2025-12-20 18:06:12 +00:00
parent 26db484c2e
commit 61941d50e5

View File

@ -1,4 +1,4 @@
// src/api/provisionGame.js
// src/api/handlers/provisionGame.js
// GAME-SIDE request normalization + validation (no payload changes yet)
export function normalizeGameRequest(body = {}) {
@ -42,7 +42,7 @@ export function normalizeGameRequest(body = {}) {
cpuCores,
memoryMiB,
diskGiB,
portsNeeded,
portsNeeded: portsNeeded || 1, // Default to 1 port for game containers
artifactPath,
javaPath,