text: /* eslint-disable func-names */
  import { Router } from 'express';
  
  import UserController from './app/controllers/UserController';
  import SessionController from './app/controllers/SessionController';
  
  import validateUserStore from './app/validators/UserStore';
  import validateSessionStore from './app/validators/SessionStore';
  
  import authMiddleware from './app/middlewares/auth';
  
  const routes = new Router();
  
  routes.get('/', function(req, res) {
    return res.json({ message: 'Listening...' });
  });
  
  routes.post('/users', validateUserStore, UserController.store);
  routes.post('/sessions', validateSessionStore, SessionController.store);
  
  routes.use(authMiddleware);
  
  export default routes;
  