routes.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /**
  2. * Route Mappings
  3. * (sails.config.routes)
  4. *
  5. * Your routes tell Sails what to do each time it receives a request.
  6. *
  7. * For more information on configuring custom routes, check out:
  8. * https://sailsjs.com/anatomy/config/routes-js
  9. */
  10. module.exports.routes = {
  11. // ╦ ╦╔═╗╔╗ ╔═╗╔═╗╔═╗╔═╗╔═╗
  12. // ║║║║╣ ╠╩╗╠═╝╠═╣║ ╦║╣ ╚═╗
  13. // ╚╩╝╚═╝╚═╝╩ ╩ ╩╚═╝╚═╝╚═╝
  14. 'GET /': { action: 'view-homepage-or-redirect' },
  15. 'GET /welcome': { action: 'dashboard/view-welcome' },
  16. 'GET /faq': { view: 'pages/faq' },
  17. 'GET /legal/terms': { view: 'pages/legal/terms' },
  18. 'GET /legal/privacy': { view: 'pages/legal/privacy' },
  19. 'GET /contact': { view: 'pages/contact' },
  20. 'GET /signup': { action: 'entrance/view-signup' },
  21. 'GET /email/confirm': { action: 'entrance/confirm-email' },
  22. 'GET /email/confirmed': { view: 'pages/entrance/confirmed-email' },
  23. 'GET /login': { action: 'entrance/view-login' },
  24. 'GET /password/forgot': { action: 'entrance/view-forgot-password' },
  25. 'GET /password/new': { action: 'entrance/view-new-password' },
  26. 'GET /account': { action: 'account/view-account-overview' },
  27. 'GET /account/password': { action: 'account/view-change-password' },
  28. 'GET /account/profile': { action: 'account/view-edit-profile' },
  29. // ╔═╗╔═╗╦ ╔═╗╔╗╔╔╦╗╔═╗╔═╗╦╔╗╔╔╦╗╔═╗
  30. // ╠═╣╠═╝║ ║╣ ║║║ ║║╠═╝║ ║║║║║ ║ ╚═╗
  31. // ╩ ╩╩ ╩ ╚═╝╝╚╝═╩╝╩ ╚═╝╩╝╚╝ ╩ ╚═╝
  32. // Note that, in this app, these API endpoints may be accessed using the `Cloud.*()` methods
  33. // from the CloudSDK library.
  34. '/api/v1/account/logout': { action: 'account/logout' },
  35. 'PUT /api/v1/account/update-password': { action: 'account/update-password' },
  36. 'PUT /api/v1/account/update-profile': { action: 'account/update-profile' },
  37. 'PUT /api/v1/account/update-billing-card': { action: 'account/update-billing-card' },
  38. 'PUT /api/v1/entrance/login': { action: 'entrance/login' },
  39. 'POST /api/v1/entrance/signup': { action: 'entrance/signup' },
  40. 'POST /api/v1/entrance/send-password-recovery-email': { action: 'entrance/send-password-recovery-email' },
  41. 'POST /api/v1/entrance/update-password-and-login': { action: 'entrance/update-password-and-login' },
  42. 'POST /api/v1/deliver-contact-form-message': { action: 'deliver-contact-form-message' },
  43. // ╦ ╦╔═╗╔╗ ╦ ╦╔═╗╔═╗╦╔═╔═╗
  44. // ║║║║╣ ╠╩╗╠═╣║ ║║ ║╠╩╗╚═╗
  45. // ╚╩╝╚═╝╚═╝╩ ╩╚═╝╚═╝╩ ╩╚═╝
  46. // ╔╦╗╦╔═╗╔═╗ ╦═╗╔═╗╔╦╗╦╦═╗╔═╗╔═╗╔╦╗╔═╗
  47. // ║║║║╚═╗║ ╠╦╝║╣ ║║║╠╦╝║╣ ║ ║ ╚═╗
  48. // ╩ ╩╩╚═╝╚═╝ ╩╚═╚═╝═╩╝╩╩╚═╚═╝╚═╝ ╩ ╚═╝
  49. '/terms': '/legal/terms',
  50. '/logout': '/api/v1/account/logout',
  51. };