moved body validation to a separate validation schema.
This commit is contained in:
1 parent
22928e5b5a
commit
ab816ce176
1 file changed
+8
@@ -182,12 +182,19 @@ const deleteChecksParamValidation = joi.object({
|
||||
//****************************************
|
||||
// PageSpeedCheckValidation
|
||||
//****************************************
|
||||
|
||||
const getPageSpeedCheckParamValidation = joi.object({
|
||||
monitorId: joi.string().required(),
|
||||
});
|
||||
|
||||
//Validation schema for the monitorId parameter
|
||||
const createPageSpeedCheckParamValidation = joi.object({
|
||||
monitorId: joi.string().required(),
|
||||
});
|
||||
|
||||
//Validation schema for the monitorId body
|
||||
const createPageSpeedCheckBodyValidation = joi.object({
|
||||
monitorId: joi.string().required(),
|
||||
accessibility: joi.number().required().min(0).max(100),
|
||||
bestPractices: joi.number().required().min(0).max(100),
|
||||
seo: joi.number().required().min(0).max(100),
|
||||
@@ -225,4 +232,5 @@ module.exports = {
|
||||
getPageSpeedCheckParamValidation,
|
||||
createPageSpeedCheckParamValidation,
|
||||
deletePageSpeedCheckParamValidation,
|
||||
createPageSpeedCheckBodyValidation,
|
||||
};
|
||||
Reference in new issue
Block a user