pages.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. 'use strict';
  2. /** Get controllers */
  3. const pagesController = require('../controllers/pages');
  4. const authMiddleware = require('../middlewares/auth');
  5. /**
  6. * Pages routes
  7. * Get informative pages
  8. *
  9. * @param {Router} - express router
  10. */
  11. module.exports = function(router){
  12. /**
  13. * Information about Libreflix
  14. */
  15. router.route('/sobre')
  16. /** GET /sobre - Get information about Libreflix */
  17. .get(pagesController.sobreController);
  18. /**
  19. * Information to download available apps
  20. */
  21. router.route('/apps')
  22. /** GET /apps - Get information to download available apps */
  23. .get(pagesController.appsController);
  24. /**
  25. * Information about Privacy Politics
  26. */
  27. router.route('/privacy')
  28. /** GET /privacy - Get information about Privacy Politics */
  29. .get(pagesController.privacyController);
  30. /**
  31. * Information about Terms
  32. */
  33. router.route('/tos')
  34. /** GET /tos - Get information about Terms */
  35. .get(pagesController.tosController);
  36. /**
  37. * Information about Digital Millennium Copyright Act (DMCA)
  38. */
  39. router.route('/dmca')
  40. /** GET /dmca - Get information about Digital Millennium Copyright Act (DMCA) */
  41. .get(pagesController.dmcaController);
  42. /**
  43. * Frequently asked questions
  44. */
  45. router.route('/faq')
  46. /** GET /faq - Get frequently asked questions */
  47. .get(pagesController.faqController);
  48. /**
  49. * Information for Press
  50. */
  51. router.route('/press')
  52. /** GET /press - Get information for Press */
  53. .get(pagesController.pressController);
  54. /**
  55. * Uploader of images
  56. */
  57. router.route('/uploader')
  58. /** GET /uploader - Get the uploader of images */
  59. .get(authMiddleware, pagesController.uploaderController);
  60. return router;
  61. }