2024-05-10 13:36:04 -07:00
|
|
|
const joi = require("joi");
|
2024-05-10 13:59:33 -07:00
|
|
|
const user = require("../models/user");
|
2024-05-09 17:06:00 -04:00
|
|
|
|
|
|
|
|
const authValidation = joi.object({
|
2024-05-10 13:36:04 -07:00
|
|
|
email: joi.string().email().required(),
|
|
|
|
|
password: joi.string().min(8).required(),
|
2024-05-09 17:06:00 -04:00
|
|
|
});
|
|
|
|
|
|
2024-05-10 13:36:04 -07:00
|
|
|
const getMonitorsByIdValidation = joi.object({
|
|
|
|
|
monitorId: joi.string().required(),
|
|
|
|
|
});
|
2024-05-09 17:06:00 -04:00
|
|
|
|
2024-05-10 13:59:33 -07:00
|
|
|
const getMonitorsByUserIdValidation = joi.object({
|
|
|
|
|
userId: joi.string().required(),
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
|
authValidation,
|
|
|
|
|
getMonitorsByIdValidation,
|
|
|
|
|
getMonitorsByUserIdValidation,
|
|
|
|
|
};
|