Built motion from commit 25580385.|2.6.2
[motion2.git] / server / api / sound / index.js
index 4848ac5..465796b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0bf2=['single','create','put','update','delete','/:id','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./sound.controller','get','index','isAuthenticated','/:id/download','download','root','server/files/sounds/original/','originalname','replace','format','%s-%s%s','basename','extname','now','post'];(function(_0x244e3f,_0x5bee35){var _0x42f22c=function(_0x528c4b){while(--_0x528c4b){_0x244e3f['push'](_0x244e3f['shift']());}};_0x42f22c(++_0x5bee35);}(_0x0bf2,0xff));var _0x20bf=function(_0x4cc2eb,_0x235cef){_0x4cc2eb=_0x4cc2eb-0x0;var _0x4742eb=_0x0bf2[_0x4cc2eb];return _0x4742eb;};'use strict';var multer=require(_0x20bf('0x0'));var util=require('util');var path=require(_0x20bf('0x1'));var timeout=require(_0x20bf('0x2'));var express=require(_0x20bf('0x3'));var router=express[_0x20bf('0x4')]();var auth=require(_0x20bf('0x5'));var interaction=require(_0x20bf('0x6'));var config=require(_0x20bf('0x7'));var controller=require(_0x20bf('0x8'));router[_0x20bf('0x9')]('/',auth['isAuthenticated'](),controller[_0x20bf('0xa')]);router[_0x20bf('0x9')]('/:id',auth[_0x20bf('0xb')](),controller['show']);router[_0x20bf('0x9')](_0x20bf('0xc'),auth['isAuthenticated'](),controller[_0x20bf('0xd')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x85a771,_0x51af40,_0x335430){_0x335430(null,path['join'](config[_0x20bf('0xe')],_0x20bf('0xf')));},'filename':function(_0x130979,_0x134bd9,_0x34961d){_0x134bd9[_0x20bf('0x10')]=_0x134bd9['originalname'][_0x20bf('0x11')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x34961d(null,util[_0x20bf('0x12')](_0x20bf('0x13'),path[_0x20bf('0x14')](_0x134bd9[_0x20bf('0x10')],path[_0x20bf('0x15')](_0x134bd9[_0x20bf('0x10')])),Date[_0x20bf('0x16')](),path[_0x20bf('0x15')](_0x134bd9[_0x20bf('0x10')])));}})});router[_0x20bf('0x17')]('/',upload[_0x20bf('0x18')]('file'),controller[_0x20bf('0x19')]);router[_0x20bf('0x1a')]('/:id',auth[_0x20bf('0xb')](),controller[_0x20bf('0x1b')]);router[_0x20bf('0x1c')](_0x20bf('0x1d'),auth[_0x20bf('0xb')](),controller[_0x20bf('0x1c')]);module[_0x20bf('0x1e')]=router;
\ No newline at end of file
+var _0x4d9d=['get','index','isAuthenticated','show','/:id/download','download','diskStorage','join','server/files/sounds/original/','originalname','%s-%s%s','now','extname','post','single','file','create','put','/:id','update','delete','exports','multer','util','connect-timeout','express','../../components/auth/service','../../config/environment','./sound.controller'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0x4d9d,0x155));var _0xd4d9=function(_0x4d23dc,_0x30def6){_0x4d23dc=_0x4d23dc-0x0;var _0x1ffc30=_0x4d9d[_0x4d23dc];return _0x1ffc30;};'use strict';var multer=require(_0xd4d9('0x0'));var util=require(_0xd4d9('0x1'));var path=require('path');var timeout=require(_0xd4d9('0x2'));var express=require(_0xd4d9('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xd4d9('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xd4d9('0x5'));var controller=require(_0xd4d9('0x6'));router[_0xd4d9('0x7')]('/',auth['isAuthenticated'](),controller[_0xd4d9('0x8')]);router[_0xd4d9('0x7')]('/:id',auth[_0xd4d9('0x9')](),controller[_0xd4d9('0xa')]);router[_0xd4d9('0x7')](_0xd4d9('0xb'),auth['isAuthenticated'](),controller[_0xd4d9('0xc')]);var upload=multer({'storage':multer[_0xd4d9('0xd')]({'destination':function(_0x123e25,_0x1fef21,_0x2298b5){_0x2298b5(null,path[_0xd4d9('0xe')](config['root'],_0xd4d9('0xf')));},'filename':function(_0x54c2de,_0x4b6d85,_0x27141d){_0x4b6d85['originalname']=_0x4b6d85[_0xd4d9('0x10')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x27141d(null,util['format'](_0xd4d9('0x11'),path['basename'](_0x4b6d85[_0xd4d9('0x10')],path['extname'](_0x4b6d85[_0xd4d9('0x10')])),Date[_0xd4d9('0x12')](),path[_0xd4d9('0x13')](_0x4b6d85['originalname'])));}})});router[_0xd4d9('0x14')]('/',upload[_0xd4d9('0x15')](_0xd4d9('0x16')),controller[_0xd4d9('0x17')]);router[_0xd4d9('0x18')](_0xd4d9('0x19'),auth[_0xd4d9('0x9')](),controller[_0xd4d9('0x1a')]);router[_0xd4d9('0x1b')](_0xd4d9('0x19'),auth[_0xd4d9('0x9')](),controller[_0xd4d9('0x1b')]);module[_0xd4d9('0x1c')]=router;
\ No newline at end of file