3 var express = require('express');
4 var controller = require('./team.controller');
5 var auth = require('../../auth/auth.service');
7 var router = express.Router();
9 router.get('/', auth.isAuthenticated(), controller.index);
10 router.get('/:id', auth.isAuthenticated(), controller.show);
11 router.post('/', auth.isAuthenticated(), controller.create);
12 router.post('/:id/agents', auth.isAuthenticated(), controller.addAgents);
13 router.put('/:id', auth.isAuthenticated(), controller.update);
14 router.put('/:id/agents', auth.isAuthenticated(), controller.removeAgents);
15 router.patch('/:id', auth.isAuthenticated(), controller.update);
16 router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
17 router.delete('/:id', auth.isAuthenticated(), controller.destroy);
19 module.exports = router;