Scalable IoT solution for real-time body position data
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

41 lines
1.0 KiB

const {Joi} = require('celebrate');
const guid = {
params: {
userId: Joi.string().guid().required()
}
}
const userAuthSchema = {
body: {
username: Joi.string().required(),
password: Joi.string().required(),
}
};
const userUpdateSchema = {
body: {
_id: Joi.string().required(),
username: Joi.string().required(),
__v: Joi.number().integer(),
email: Joi.string().email(),
registered: Joi.string(),
lastLogin: Joi.string(),
password: Joi.string().alphanum().allow(''),
newPassword: Joi.string().alphanum().allow(''),
}
}
;
const athleteUpdateSchema = {
body: {
_id: Joi.string().required(),
id: Joi.string().required(),
socketID: Joi.string().required(),
name: Joi.string().required(),
__v: Joi.number().integer(),
_trainer: Joi.string().allow('').default(''),
}
}
module.exports = {guid, userAuthSchema, userUpdateSchema, athleteUpdateSchema}