Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Joi from 'joi'
- import Boom from 'boom'
- /**
- * Account schemas
- */
- export default {
- payload: Joi.object()
- .keys({
- username: Joi.string().allow(null)
- .description('username'),
- password: Joi.string().allow(null)
- .description('password')
- }).label('listing payload')
- ,
- response: Joi.object()
- .keys({
- id: Joi.string()
- .description('id'),
- uid: Joi.string()
- .description('uid'),
- suid: Joi.string()
- .description('suid'),
- ouid: Joi.string().allow(null)
- .description('ouid'),
- username: Joi.string().allow(null)
- .description('username'),
- password: Joi.string().allow(null)
- .description('password'),
- type: Joi.string().allow(null)
- .description('type'),
- profile: Joi.object().allow(null)
- .description('profile object'),
- createdAt: Joi.date()
- .description('created at'),
- updatedAt: Joi.date()
- .description('updated at')
- }).label('listing reponse'),
- get collection() {
- return Joi
- .array()
- .items(this.response)
- .label('listings');
- }
- }
Add Comment
Please, Sign In to add comment