admin.js 530 B

1234567891011121314151617181920
  1. 'use strict';
  2. /** Get controllers */
  3. const userController = require('../controllers/admin');
  4. const authAdmin = require('../middlewares/auth-admin');
  5. /**
  6. * Account routes
  7. * You can create, see, update and delete a user using email a social account (Facebook and Twitter are available now)
  8. *
  9. * @param {Router} - express router
  10. */
  11. module.exports = function (router, passport) {
  12. router.route('/list-watches')
  13. /** Auth Middleware applied to all routes below */
  14. .all(authAdmin)
  15. .get(userController.listWatches);
  16. }