contact.js 562 B

12345678910111213141516171819202122232425262728
  1. 'use strict';
  2. /** Get controllers */
  3. const contactController = require('../controllers/contact');
  4. /**
  5. * Contact routes
  6. * Available to get contact emails from users
  7. *
  8. * @param {Router} - express router
  9. */
  10. module.exports = function (router) {
  11. /**
  12. * Create a new contact email
  13. */
  14. router.route('/contato')
  15. /** GET /contato - UI for contact email */
  16. .get(contactController.contactGet);
  17. /**
  18. * Send contact email
  19. */
  20. router.route('/contato')
  21. /** POST /contato - Send a contact email */
  22. .post(contactController.contactPost);
  23. return router;
  24. }