Built motion from commit 4143fce.|0.0.15
[motion.git] / server / api / custom_field / index.js
1 'use strict';
2
3 var express = require('express');
4 var controller = require('./custom_field.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('/all', auth.isAuthenticated(), controller.getAll);
11 router.get('/:id', auth.isAuthenticated(), controller.show);
12 router.post('/', auth.isAuthenticated(), controller.create);
13 router.post('/validate', auth.isAuthenticated(), controller.customFieldValidation);
14 router.put('/:id', auth.isAuthenticated(), controller.update);
15 router.patch('/:id', auth.isAuthenticated(), controller.update);
16 router.delete('/', auth.isAuthenticated(), controller.bulkDeactivate);
17 router.delete('/:id', auth.isAuthenticated(), controller.deactivate);
18
19 module.exports = router;