{"size": 629, "ext": "js", "max_stars_repo_path": "src/routes.js", "max_stars_repo_name": "ThiagoKienbaum/fastfeet-backend", "max_stars_repo_stars_event_min_datetime": "2020-05-27T10:36:23.000Z", "max_stars_repo_stars_event_max_datetime": "2020-05-27T10:36:23.000Z", "max_issues_repo_path": "src/routes.js", "max_issues_repo_name": "ThiagoKienbaum/fastfeet-backend", "max_issues_repo_issues_event_min_datetime": "2021-05-11T12:32:54.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-11T12:32:54.000Z", "max_forks_repo_path": "src/routes.js", "max_forks_repo_name": "ThiagoKienbaum/fastfeet-backend", "max_forks_repo_forks_event_min_datetime": "2020-07-11T12:00:53.000Z", "max_forks_repo_forks_event_max_datetime": "2020-07-11T12:00:53.000Z"}
{"max_stars_count": 1, "max_issues_count": 1, "max_forks_count": 1, "avg_line_length": 37.0, "max_line_length": 73, "alphanum_fraction": 0.7933227345}
import { Router } from 'express';
import UserController from './app/controllers/UserController';
import RecipientsController from './app/controllers/RecipientsController'
import SessionController from './app/controllers/SessionController';
import authMiddleware from './app/middlewares/auth';

const routes = new Router();

routes.post('/users', UserController.store);
routes.post('/sessions', SessionController.store);

routes.use(authMiddleware);
routes.put('/users', UserController.update);
routes.post('/recipients', RecipientsController.store);
routes.put('/recipients', RecipientsController.update);

export default routes;