Built motion from commit b5413ace.|2.6.9
[motion2.git] / server / api / sound / index.js
index 217a09b..cc68410 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x37a7=['util','Router','fs-extra','./sound.controller','get','isAuthenticated','index','show','/:id/download','download','diskStorage','join','root','server/files/sounds/original/','originalname','replace','format','%s-%s%s','basename','extname','now','single','file','create','put','/:id','delete','multer'];(function(_0x3b5a43,_0x4b4c71){var _0x32b606=function(_0xc4186){while(--_0xc4186){_0x3b5a43['push'](_0x3b5a43['shift']());}};_0x32b606(++_0x4b4c71);}(_0x37a7,0x6f));var _0x737a=function(_0x235487,_0x3d254f){_0x235487=_0x235487-0x0;var _0x25141a=_0x37a7[_0x235487];return _0x25141a;};'use strict';var multer=require(_0x737a('0x0'));var util=require(_0x737a('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x737a('0x2')]();var fs_extra=require(_0x737a('0x3'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x737a('0x4'));router[_0x737a('0x5')]('/',auth[_0x737a('0x6')](),controller[_0x737a('0x7')]);router[_0x737a('0x5')]('/:id',auth[_0x737a('0x6')](),controller[_0x737a('0x8')]);router[_0x737a('0x5')](_0x737a('0x9'),auth['isAuthenticated'](),controller[_0x737a('0xa')]);var upload=multer({'storage':multer[_0x737a('0xb')]({'destination':function(_0x5ad258,_0x2b1c32,_0x192e18){_0x192e18(null,path[_0x737a('0xc')](config[_0x737a('0xd')],_0x737a('0xe')));},'filename':function(_0x27ccd9,_0x2b34f2,_0x4bcf5e){_0x2b34f2[_0x737a('0xf')]=_0x2b34f2[_0x737a('0xf')][_0x737a('0x10')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x4bcf5e(null,util[_0x737a('0x11')](_0x737a('0x12'),path[_0x737a('0x13')](_0x2b34f2[_0x737a('0xf')],path[_0x737a('0x14')](_0x2b34f2['originalname'])),Date[_0x737a('0x15')](),path[_0x737a('0x14')](_0x2b34f2['originalname'])));}})});router['post']('/',upload[_0x737a('0x16')](_0x737a('0x17')),controller[_0x737a('0x18')]);router[_0x737a('0x19')](_0x737a('0x1a'),auth[_0x737a('0x6')](),controller['update']);router[_0x737a('0x1b')]('/:id',auth[_0x737a('0x6')](),controller[_0x737a('0x1b')]);module['exports']=router;
\ No newline at end of file
+var _0x3779=['index','isAuthenticated','show','/:id/download','download','join','server/files/sounds/original/','originalname','replace','format','%s-%s%s','basename','extname','now','post','single','file','create','/:id','update','delete','exports','multer','util','Router','fs-extra','../../components/auth/service','../../config/environment','get'];(function(_0x48deac,_0x4d8ab8){var _0x3b5eaa=function(_0x91c61e){while(--_0x91c61e){_0x48deac['push'](_0x48deac['shift']());}};_0x3b5eaa(++_0x4d8ab8);}(_0x3779,0x155));var _0x9377=function(_0x305c31,_0x466b17){_0x305c31=_0x305c31-0x0;var _0x17f39f=_0x3779[_0x305c31];return _0x17f39f;};'use strict';var multer=require(_0x9377('0x0'));var util=require(_0x9377('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x9377('0x2')]();var fs_extra=require(_0x9377('0x3'));var auth=require(_0x9377('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x9377('0x5'));var controller=require('./sound.controller');router[_0x9377('0x6')]('/',auth['isAuthenticated'](),controller[_0x9377('0x7')]);router[_0x9377('0x6')]('/:id',auth[_0x9377('0x8')](),controller[_0x9377('0x9')]);router['get'](_0x9377('0xa'),auth[_0x9377('0x8')](),controller[_0x9377('0xb')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x22526b,_0x567481,_0x28036b){_0x28036b(null,path[_0x9377('0xc')](config['root'],_0x9377('0xd')));},'filename':function(_0x6ecee6,_0x1df23f,_0x5f165e){_0x1df23f[_0x9377('0xe')]=_0x1df23f[_0x9377('0xe')][_0x9377('0xf')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x5f165e(null,util[_0x9377('0x10')](_0x9377('0x11'),path[_0x9377('0x12')](_0x1df23f[_0x9377('0xe')],path[_0x9377('0x13')](_0x1df23f[_0x9377('0xe')])),Date[_0x9377('0x14')](),path[_0x9377('0x13')](_0x1df23f[_0x9377('0xe')])));}})});router[_0x9377('0x15')]('/',upload[_0x9377('0x16')](_0x9377('0x17')),controller[_0x9377('0x18')]);router['put'](_0x9377('0x19'),auth[_0x9377('0x8')](),controller[_0x9377('0x1a')]);router[_0x9377('0x1b')](_0x9377('0x19'),auth[_0x9377('0x8')](),controller[_0x9377('0x1b')]);module[_0x9377('0x1c')]=router;
\ No newline at end of file