add getMonitorStatsByIdValidation
This commit is contained in:
1 parent
88316de306
commit
a6c3c56d0b
1 file changed
+13
@@ -1,4 +1,5 @@
|
|||||||
const joi = require("joi");
|
const joi = require("joi");
|
||||||
|
const { normalize } = require("path");
|
||||||
|
|
||||||
//****************************************
|
//****************************************
|
||||||
// Custom Validators
|
// Custom Validators
|
||||||
@@ -177,6 +178,18 @@ const getMonitorsByTeamIdQueryValidation = joi.object({
|
|||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
getMonitorStatsByIdParamValidation = joi.object({
|
||||||
|
monitorId: joi.string().required(),
|
||||||
|
});
|
||||||
|
getMonitorStatsByIdQueryValidation = joi.object({
|
||||||
|
status: joi.string(),
|
||||||
|
limit: joi.number(),
|
||||||
|
sortOrder: joi.string().valid("asc", "desc"),
|
||||||
|
dateRange: joi.string().valid("day", "week", "month"),
|
||||||
|
numToDisplay: joi.number(),
|
||||||
|
normalize: joi.boolean(),
|
||||||
|
});
|
||||||
|
|
||||||
const createMonitorBodyValidation = joi.object({
|
const createMonitorBodyValidation = joi.object({
|
||||||
_id: joi.string(),
|
_id: joi.string(),
|
||||||
userId: joi.string().required(),
|
userId: joi.string().required(),
|
||||||
|
|||||||
Reference in new issue
Block a user