Merge pull request #3234 from bluewave-labs/fix/validation

Fix validation
This commit is contained in:
Alexander Holliday authored and GitHub committed 2026-02-03 09:42:32 -08:00
commit ab12a9bd3a
1 file changed
+8 -12
+8 -12
View File
@@ -162,12 +162,10 @@ const createMonitorBodyValidation = joi.object({
port: joi.number(), port: joi.number(),
isActive: joi.boolean(), isActive: joi.boolean(),
interval: joi.number(), interval: joi.number(),
thresholds: joi.object().keys({ cpuAlertThreshold: joi.number(),
usage_cpu: joi.number(), memoryAlertThreshold: joi.number(),
usage_memory: joi.number(), diskAlertThreshold: joi.number(),
usage_disk: joi.number(), tempAlertThreshold: joi.number(),
usage_temperature: joi.number(),
}),
notifications: joi.array().items(joi.string()), notifications: joi.array().items(joi.string()),
secret: joi.string(), secret: joi.string(),
jsonPath: joi.string().allow(""), jsonPath: joi.string().allow(""),
@@ -200,12 +198,10 @@ const editMonitorBodyValidation = joi
expectedValue: joi.string().allow(""), expectedValue: joi.string().allow(""),
matchMethod: joi.string().allow(null, ""), matchMethod: joi.string().allow(null, ""),
port: joi.number().min(1).max(65535), port: joi.number().min(1).max(65535),
thresholds: joi.object().keys({ cpuAlertThreshold: joi.number(),
usage_cpu: joi.number(), memoryAlertThreshold: joi.number(),
usage_memory: joi.number(), diskAlertThreshold: joi.number(),
usage_disk: joi.number(), tempAlertThreshold: joi.number(),
usage_temperature: joi.number(),
}),
gameId: joi.string().allow(""), gameId: joi.string().allow(""),
selectedDisks: joi.array().items(joi.string()).optional(), selectedDisks: joi.array().items(joi.string()).optional(),
group: joi.string().max(50).trim().allow(null, "").optional(), group: joi.string().max(50).trim().allow(null, "").optional(),