X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fapi%2Fsound%2Findex.js;h=9d63eb08a674b4fafa301259a718388e06918683;hb=cf0590116080d9ba42ef56ec3321a2b1292c0360;hp=2783fd781f82c5eb3223f7ca2f6342d00d3c1e7a;hpb=d0e53397894213749637bb93a101e4fc9544eaa3;p=motion2.git diff --git a/server/api/sound/index.js b/server/api/sound/index.js index 2783fd7..9d63eb0 100644 --- a/server/api/sound/index.js +++ b/server/api/sound/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x934b=['../../config/environment','./sound.controller','get','isAuthenticated','index','/:id','/:id/download','download','join','root','originalname','format','%s-%s%s','basename','now','extname','single','file','create','update','delete','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service'];(function(_0x4dd424,_0x1e525b){var _0x37ab91=function(_0x849175){while(--_0x849175){_0x4dd424['push'](_0x4dd424['shift']());}};_0x37ab91(++_0x1e525b);}(_0x934b,0x8a));var _0xb934=function(_0x46428c,_0x20ab75){_0x46428c=_0x46428c-0x0;var _0x16a677=_0x934b[_0x46428c];return _0x16a677;};'use strict';var multer=require(_0xb934('0x0'));var util=require('util');var path=require(_0xb934('0x1'));var timeout=require(_0xb934('0x2'));var express=require(_0xb934('0x3'));var router=express[_0xb934('0x4')]();var auth=require(_0xb934('0x5'));var interaction=require(_0xb934('0x6'));var config=require(_0xb934('0x7'));var controller=require(_0xb934('0x8'));router[_0xb934('0x9')]('/',auth[_0xb934('0xa')](),controller[_0xb934('0xb')]);router[_0xb934('0x9')](_0xb934('0xc'),auth['isAuthenticated'](),controller['show']);router[_0xb934('0x9')](_0xb934('0xd'),auth['isAuthenticated'](),controller[_0xb934('0xe')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x4f047e,_0x542bca,_0x3467e1){_0x3467e1(null,path[_0xb934('0xf')](config[_0xb934('0x10')],'server/files/sounds/original/'));},'filename':function(_0x1cac41,_0x599c8a,_0x35dfca){_0x599c8a[_0xb934('0x11')]=_0x599c8a['originalname']['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x35dfca(null,util[_0xb934('0x12')](_0xb934('0x13'),path[_0xb934('0x14')](_0x599c8a[_0xb934('0x11')],path['extname'](_0x599c8a['originalname'])),Date[_0xb934('0x15')](),path[_0xb934('0x16')](_0x599c8a['originalname'])));}})});router['post']('/',upload[_0xb934('0x17')](_0xb934('0x18')),controller[_0xb934('0x19')]);router['put'](_0xb934('0xc'),auth[_0xb934('0xa')](),controller[_0xb934('0x1a')]);router[_0xb934('0x1b')](_0xb934('0xc'),auth[_0xb934('0xa')](),controller[_0xb934('0x1b')]);module[_0xb934('0x1c')]=router; \ No newline at end of file +var _0xfa5e=['exports','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./sound.controller','get','isAuthenticated','show','/:id/download','download','join','root','server/files/sounds/original/','originalname','replace','basename','now','extname','post','file','create','put','/:id','update','delete'];(function(_0x5dea35,_0x4403ce){var _0x420537=function(_0x262e1c){while(--_0x262e1c){_0x5dea35['push'](_0x5dea35['shift']());}};_0x420537(++_0x4403ce);}(_0xfa5e,0x169));var _0xefa5=function(_0x21a486,_0x5e8058){_0x21a486=_0x21a486-0x0;var _0x29a70b=_0xfa5e[_0x21a486];return _0x29a70b;};'use strict';var multer=require(_0xefa5('0x0'));var util=require(_0xefa5('0x1'));var path=require(_0xefa5('0x2'));var timeout=require(_0xefa5('0x3'));var express=require(_0xefa5('0x4'));var router=express[_0xefa5('0x5')]();var auth=require('../../components/auth/service');var interaction=require(_0xefa5('0x6'));var config=require(_0xefa5('0x7'));var controller=require(_0xefa5('0x8'));router[_0xefa5('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0xefa5('0x9')]('/:id',auth[_0xefa5('0xa')](),controller[_0xefa5('0xb')]);router[_0xefa5('0x9')](_0xefa5('0xc'),auth[_0xefa5('0xa')](),controller[_0xefa5('0xd')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x281ba2,_0x5c45dc,_0x126dfa){_0x126dfa(null,path[_0xefa5('0xe')](config[_0xefa5('0xf')],_0xefa5('0x10')));},'filename':function(_0x3c753f,_0xad2c0c,_0x4c8730){_0xad2c0c[_0xefa5('0x11')]=_0xad2c0c[_0xefa5('0x11')][_0xefa5('0x12')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x4c8730(null,util['format']('%s-%s%s',path[_0xefa5('0x13')](_0xad2c0c[_0xefa5('0x11')],path['extname'](_0xad2c0c[_0xefa5('0x11')])),Date[_0xefa5('0x14')](),path[_0xefa5('0x15')](_0xad2c0c[_0xefa5('0x11')])));}})});router[_0xefa5('0x16')]('/',upload['single'](_0xefa5('0x17')),controller[_0xefa5('0x18')]);router[_0xefa5('0x19')](_0xefa5('0x1a'),auth[_0xefa5('0xa')](),controller[_0xefa5('0x1b')]);router[_0xefa5('0x1c')]('/:id',auth[_0xefa5('0xa')](),controller[_0xefa5('0x1c')]);module[_0xefa5('0x1d')]=router; \ No newline at end of file