Archived
2

added status filter

This commit is contained in:
VLE2FE
2020-06-15 12:49:32 +02:00
parent 5c04263475
commit c95af7bc0b
6 changed files with 69 additions and 2 deletions

View File

@ -118,4 +118,10 @@ export default class SampleValidate {
const {value, error} = Joi.object(joiObject).validate(data, {stripUnknown: true});
return error !== undefined? null : value;
}
static query (data) {
return Joi.object({
status: Joi.string().valid('validated', 'new', 'all')
}).validate(data);
}
}