Added create and delete monitor routes, Added JSDocs to MongoDB
This commit is contained in:
1 parent
d18b88aa15
commit
e7cd1ae6ab
5 files changed
+191
-13
No files matched your search
@@ -12,7 +12,7 @@ const registerValidation = joi.object({
|
||||
password: joi.string().min(8).required(),
|
||||
});
|
||||
|
||||
const getMonitorsByIdValidation = joi.object({
|
||||
const getMonitorByIdValidation = joi.object({
|
||||
monitorId: joi.string().required(),
|
||||
});
|
||||
|
||||
@@ -20,9 +20,19 @@ const getMonitorsByUserIdValidation = joi.object({
|
||||
userId: joi.string().required(),
|
||||
});
|
||||
|
||||
const createMonitorValidation = joi.object({
|
||||
userId: joi.string().required(),
|
||||
name: joi.string().required(),
|
||||
description: joi.string().required(),
|
||||
url: joi.string().uri().required(),
|
||||
isActive: joi.boolean(),
|
||||
interval: joi.number(),
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
loginValidation,
|
||||
registerValidation,
|
||||
getMonitorsByIdValidation,
|
||||
getMonitorByIdValidation,
|
||||
getMonitorsByUserIdValidation,
|
||||
createMonitorValidation,
|
||||
};
|
||||
Reference in new issue
Block a user