mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-20 08:28:48 -05:00
Merge pull request #3234 from bluewave-labs/fix/validation
Fix validation
This commit is contained in:
@@ -162,12 +162,10 @@ const createMonitorBodyValidation = joi.object({
|
||||
port: joi.number(),
|
||||
isActive: joi.boolean(),
|
||||
interval: joi.number(),
|
||||
thresholds: joi.object().keys({
|
||||
usage_cpu: joi.number(),
|
||||
usage_memory: joi.number(),
|
||||
usage_disk: joi.number(),
|
||||
usage_temperature: joi.number(),
|
||||
}),
|
||||
cpuAlertThreshold: joi.number(),
|
||||
memoryAlertThreshold: joi.number(),
|
||||
diskAlertThreshold: joi.number(),
|
||||
tempAlertThreshold: joi.number(),
|
||||
notifications: joi.array().items(joi.string()),
|
||||
secret: joi.string(),
|
||||
jsonPath: joi.string().allow(""),
|
||||
@@ -200,12 +198,10 @@ const editMonitorBodyValidation = joi
|
||||
expectedValue: joi.string().allow(""),
|
||||
matchMethod: joi.string().allow(null, ""),
|
||||
port: joi.number().min(1).max(65535),
|
||||
thresholds: joi.object().keys({
|
||||
usage_cpu: joi.number(),
|
||||
usage_memory: joi.number(),
|
||||
usage_disk: joi.number(),
|
||||
usage_temperature: joi.number(),
|
||||
}),
|
||||
cpuAlertThreshold: joi.number(),
|
||||
memoryAlertThreshold: joi.number(),
|
||||
diskAlertThreshold: joi.number(),
|
||||
tempAlertThreshold: joi.number(),
|
||||
gameId: joi.string().allow(""),
|
||||
selectedDisks: joi.array().items(joi.string()).optional(),
|
||||
group: joi.string().max(50).trim().allow(null, "").optional(),
|
||||
|
||||
Reference in New Issue
Block a user