Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

get-user.js 669B

1234567891011121314151617181920212223242526272829
  1. const Joi = require('joi')
  2. const { validator, response } = require('../../schemas/users.js')
  3. const userHandlers = require('../handlers/user')
  4. const docs = {
  5. description: 'get user',
  6. notes: 'Returns a user by the email passed in the path',
  7. tags: ['api'],
  8. }
  9. module.exports = {
  10. method: 'GET',
  11. path: '/{user_email}',
  12. options: {
  13. ...docs,
  14. // auth: 'default_jwt',
  15. auth: false,
  16. cors: true,
  17. handler: userHandlers.get,
  18. validate: {
  19. params: validator,
  20. failAction: 'log',
  21. },
  22. response: {
  23. schema: response,
  24. failAction: 'log',
  25. },
  26. },
  27. }