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.

profiles.js 854B

123456789101112131415161718192021222324252627282930
  1. 'use strict'
  2. const Joi = require('joi')
  3. const surveyResponseSchema = require('./responses')
  4. const userSchema = require('./user')
  5. const tagSchema = require('./tags')
  6. const singleProfile = Joi.object({
  7. profile_id: Joi.number(),
  8. user_id: Joi.number(),
  9. user_name: Joi.string(),
  10. user_email: Joi.string(),
  11. responses: surveyResponseSchema.list,
  12. reveal: Joi.array().items(),
  13. tags: tagSchema.list,
  14. media: Joi.any(),
  15. blurb: Joi.any(),
  16. image: Joi.any(),
  17. user_type: Joi.any(),
  18. user: userSchema.single,
  19. profile_description: Joi.string().allow(null, ''),
  20. profile_prefs: Joi.object(),
  21. profile_media: Joi.array().items(),
  22. profile_languages: Joi.array().items(),
  23. }).label('profile_single')
  24. module.exports = {
  25. single: singleProfile,
  26. list: Joi.array().items(singleProfile).label('profile_list'),
  27. }