[FEATURE] Initial Extra Ports

This commit is contained in:
Dunemask 2024-01-19 10:54:48 -07:00
parent 69018292b7
commit 2884709bb1
7 changed files with 81 additions and 7 deletions

View file

@ -24,6 +24,14 @@ function payloadFilter(req, res) {
if (!version) return res.status(400).send("Server version is required!");
if (!serverType) return res.status(400).send("Server type is required!");
if (!memory) return res.status(400).send("Memory is required!");
if (
!!extraPorts &&
(!Array.isArray(extraPorts) ||
extraPorts.find((e) => typeof e !== "string" || e.length > 5))
)
return res
.status(400)
.send("Extra ports must be a list of strings with length of 5!");
// TODO: Impliment non creation time backups
if (
!!backupHost ||