Feat/maintenance window controller (#475)
* Added createMaintenanceWindow route * Added getMaintenanceWindowsByUserId * Added getMaintenaceWindowsByMonitorId method, updated routes * Exported delete methods
This commit is contained in:
1 parent
5fe92f2b31
commit
95dfc8d82c
7 files changed
+168
-2
No files matched your search
@@ -252,6 +252,30 @@ const deletePageSpeedCheckParamValidation = joi.object({
|
||||
monitorId: joi.string().required(),
|
||||
});
|
||||
|
||||
//****************************************
|
||||
// MaintenanceWindowValidation
|
||||
//****************************************
|
||||
const createMaintenanceWindowParamValidation = joi.object({
|
||||
monitorId: joi.string().required(),
|
||||
});
|
||||
|
||||
const createMaintenanceWindowBodyValidation = joi.object({
|
||||
userId: joi.string().required(),
|
||||
active: joi.boolean().required(),
|
||||
oneTime: joi.boolean().required(),
|
||||
start: joi.date().required(),
|
||||
end: joi.date().required(),
|
||||
expiry: joi.date(),
|
||||
});
|
||||
|
||||
const getMaintenanceWindowsByUserIdParamValidation = joi.object({
|
||||
userId: joi.string().required(),
|
||||
});
|
||||
|
||||
const getMaintenanceWindowsByMonitorIdParamValidation = joi.object({
|
||||
monitorId: joi.string().required(),
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
roleValidatior,
|
||||
loginValidation,
|
||||
@@ -287,4 +311,8 @@ module.exports = {
|
||||
createPageSpeedCheckParamValidation,
|
||||
deletePageSpeedCheckParamValidation,
|
||||
createPageSpeedCheckBodyValidation,
|
||||
createMaintenanceWindowParamValidation,
|
||||
createMaintenanceWindowBodyValidation,
|
||||
getMaintenanceWindowsByUserIdParamValidation,
|
||||
getMaintenanceWindowsByMonitorIdParamValidation,
|
||||
};
|
||||
Reference in new issue
Block a user