0.0.11 | Built motion from commit e8dda05.
[motion.git] / server / api / contact_manager / index.js
1 'use strict';
2
3 var express = require('express');
4 var controller = require('./contact_manager.controller');
5 var auth = require('../../auth/auth.service');
6
7 var router = express.Router();
8
9 router.get('/', auth.isAuthenticated(), controller.index);
10 router.get('/:id', auth.isAuthenticated(), controller.show);
11 router.get('/:id/history', auth.isAuthenticated(), controller.getHistory);
12 router.post('/', auth.isAuthenticated(), controller.create);
13 router.post('/validate', auth.isAuthenticated(), controller.contactValidation);
14 router.put('/:id', auth.isAuthenticated(), controller.update);
15 router.put('/join/:id', auth.isAuthenticated(), controller.joinContacts);
16 router.patch('/:id', auth.isAuthenticated(), controller.update);
17 router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
18 router.delete('/:id', auth.isAuthenticated(), controller.destroy);
19
20 module.exports = router;