Guest User

Untitled

a guest
Mar 24th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. import Joi from 'joi'
  2. import Boom from 'boom'
  3. /**
  4. * Account schemas
  5. */
  6. export default {
  7.  
  8. payload: Joi.object()
  9. .keys({
  10.  
  11. username: Joi.string().allow(null)
  12. .description('username'),
  13.  
  14. password: Joi.string().allow(null)
  15. .description('password')
  16.  
  17. }).label('listing payload')
  18. ,
  19.  
  20. response: Joi.object()
  21. .keys({
  22.  
  23. id: Joi.string()
  24. .description('id'),
  25. uid: Joi.string()
  26. .description('uid'),
  27.  
  28. suid: Joi.string()
  29. .description('suid'),
  30.  
  31. ouid: Joi.string().allow(null)
  32. .description('ouid'),
  33.  
  34. username: Joi.string().allow(null)
  35. .description('username'),
  36.  
  37. password: Joi.string().allow(null)
  38. .description('password'),
  39.  
  40. type: Joi.string().allow(null)
  41. .description('type'),
  42.  
  43. profile: Joi.object().allow(null)
  44. .description('profile object'),
  45.  
  46. createdAt: Joi.date()
  47. .description('created at'),
  48.  
  49. updatedAt: Joi.date()
  50. .description('updated at')
  51.  
  52. }).label('listing reponse'),
  53.  
  54. get collection() {
  55. return Joi
  56. .array()
  57. .items(this.response)
  58. .label('listings');
  59. }
  60.  
  61. }
Add Comment
Please, Sign In to add comment