Built motion from commit 5e31ea4.|0.0.32
[motion.git] / server / api / voice_extension / index.js
index 0bf9237..cf428d7 100644 (file)
@@ -1 +1,22 @@
-var _0x2feb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x72\x6F\x75\x74\x65\x2F\x3A\x72\x6F\x75\x74\x65","\x73\x68\x6F\x77\x42\x79\x52\x6F\x75\x74\x65","\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x73\x42\x79\x52\x6F\x75\x74\x65","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65","\x72\x6F\x75\x74\x65\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x70\x6F\x73\x74","\x73\x6F\x72\x74\x41\x70\x70\x73\x42\x79\x52\x6F\x75\x74\x65","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x2feb[0];var express=require(_0x2feb[1]);var controller=require(_0x2feb[2]);var auth=require(_0x2feb[3]);var router=express.Router();router[_0x2feb[7]](_0x2feb[4],auth[_0x2feb[5]](),controller[_0x2feb[6]]);router[_0x2feb[7]](_0x2feb[8],auth[_0x2feb[5]](),controller[_0x2feb[9]]);router[_0x2feb[7]](_0x2feb[10],auth[_0x2feb[5]](),controller[_0x2feb[11]]);router[_0x2feb[7]](_0x2feb[12],auth[_0x2feb[5]](),controller[_0x2feb[11]]);router[_0x2feb[7]](_0x2feb[13],auth[_0x2feb[5]](),controller[_0x2feb[14]]);router[_0x2feb[17]](_0x2feb[15],auth[_0x2feb[5]](),controller[_0x2feb[16]]);router[_0x2feb[17]](_0x2feb[13],auth[_0x2feb[5]](),controller[_0x2feb[18]]);router[_0x2feb[17]](_0x2feb[4],auth[_0x2feb[5]](),controller[_0x2feb[19]]);router[_0x2feb[21]](_0x2feb[12],auth[_0x2feb[5]](),controller[_0x2feb[20]]);router[_0x2feb[21]](_0x2feb[10],auth[_0x2feb[5]](),controller[_0x2feb[22]]);router[_0x2feb[24]](_0x2feb[4],auth[_0x2feb[5]](),controller[_0x2feb[23]]);router[_0x2feb[24]](_0x2feb[12],auth[_0x2feb[5]](),controller[_0x2feb[25]]);module[_0x2feb[26]]=router;
\ No newline at end of file
+'use strict';
+
+var express = require('express');
+var controller = require('./voice_extension.controller');
+var auth = require('../../auth/auth.service');
+
+var router = express.Router();
+
+router.get('/', auth.isAuthenticated(), controller.index);
+router.get('/route/:route', auth.isAuthenticated(), controller.showByRoute);
+router.get('/applications/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id', auth.isAuthenticated(), controller.show);
+router.get('/:id/applications', auth.isAuthenticated(), controller.showAppsByRoute);
+router.post('/validate', auth.isAuthenticated(), controller.routeValidation);
+router.post('/:id/applications', auth.isAuthenticated(), controller.sortAppsByRoute);
+router.post('/', auth.isAuthenticated(), controller.create);
+router.put('/:id', auth.isAuthenticated(), controller.update);
+router.put('/applications/:id', auth.isAuthenticated(), controller.updateApplication);
+router.delete('/', auth.isAuthenticated(), controller.bulkDestroy);
+router.delete('/:id', auth.isAuthenticated(), controller.destroy);
+
+module.exports = router;