Fixed <1GB Ram issue with it throwing integer error

This commit is contained in:
Muhammad Ibrahim
2025-09-30 21:53:30 +01:00
parent 8be25283dc
commit b3d7e49961
2 changed files with 18 additions and 8 deletions

View File

@@ -281,12 +281,12 @@ router.post(
.withMessage("CPU cores must be a positive integer"),
body("ramInstalled")
.optional()
.isInt({ min: 1 })
.withMessage("RAM installed must be a positive integer"),
.isFloat({ min: 0.01 })
.withMessage("RAM installed must be a positive number"),
body("swapSize")
.optional()
.isInt({ min: 0 })
.withMessage("Swap size must be a non-negative integer"),
.isFloat({ min: 0 })
.withMessage("Swap size must be a non-negative number"),
body("diskDetails")
.optional()
.isArray()