Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / sound / index.js
index f4be9d6..7d9b841 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4f57=['originalname','replace','format','%s-%s%s','basename','now','single','file','create','update','delete','exports','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./sound.controller','get','isAuthenticated','/:id','show','/:id/download','root','server/files/sounds/original/'];(function(_0x28dea7,_0x457a03){var _0x55f794=function(_0x660219){while(--_0x660219){_0x28dea7['push'](_0x28dea7['shift']());}};_0x55f794(++_0x457a03);}(_0x4f57,0x15e));var _0x74f5=function(_0x656c1d,_0x23d11f){_0x656c1d=_0x656c1d-0x0;var _0x2e07aa=_0x4f57[_0x656c1d];return _0x2e07aa;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x74f5('0x0'));var timeout=require(_0x74f5('0x1'));var express=require(_0x74f5('0x2'));var router=express[_0x74f5('0x3')]();var auth=require(_0x74f5('0x4'));var interaction=require(_0x74f5('0x5'));var config=require('../../config/environment');var controller=require(_0x74f5('0x6'));router[_0x74f5('0x7')]('/',auth[_0x74f5('0x8')](),controller['index']);router[_0x74f5('0x7')](_0x74f5('0x9'),auth['isAuthenticated'](),controller[_0x74f5('0xa')]);router[_0x74f5('0x7')](_0x74f5('0xb'),auth[_0x74f5('0x8')](),controller['download']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x5adee6,_0x517f1b,_0x38cd7b){_0x38cd7b(null,path['join'](config[_0x74f5('0xc')],_0x74f5('0xd')));},'filename':function(_0x298673,_0x69fc8e,_0x5d3848){_0x69fc8e[_0x74f5('0xe')]=_0x69fc8e['originalname'][_0x74f5('0xf')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x5d3848(null,util[_0x74f5('0x10')](_0x74f5('0x11'),path[_0x74f5('0x12')](_0x69fc8e[_0x74f5('0xe')],path['extname'](_0x69fc8e['originalname'])),Date[_0x74f5('0x13')](),path['extname'](_0x69fc8e['originalname'])));}})});router['post']('/',upload[_0x74f5('0x14')](_0x74f5('0x15')),controller[_0x74f5('0x16')]);router['put'](_0x74f5('0x9'),auth[_0x74f5('0x8')](),controller[_0x74f5('0x17')]);router[_0x74f5('0x18')](_0x74f5('0x9'),auth[_0x74f5('0x8')](),controller['delete']);module[_0x74f5('0x19')]=router;
\ No newline at end of file
+var _0xe67f=['../../config/environment','./sound.controller','get','isAuthenticated','/:id','show','/:id/download','root','originalname','replace','format','%s-%s%s','now','extname','post','file','put','update','delete','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x2f1880,_0x3997df){var _0x5374b1=function(_0x4daf28){while(--_0x4daf28){_0x2f1880['push'](_0x2f1880['shift']());}};_0x5374b1(++_0x3997df);}(_0xe67f,0x1de));var _0xfe67=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xe67f[_0x122ef9];return _0x42fba0;};'use strict';var multer=require(_0xfe67('0x0'));var util=require(_0xfe67('0x1'));var path=require(_0xfe67('0x2'));var timeout=require('connect-timeout');var express=require(_0xfe67('0x3'));var router=express[_0xfe67('0x4')]();var fs_extra=require(_0xfe67('0x5'));var auth=require(_0xfe67('0x6'));var interaction=require(_0xfe67('0x7'));var config=require(_0xfe67('0x8'));var controller=require(_0xfe67('0x9'));router[_0xfe67('0xa')]('/',auth[_0xfe67('0xb')](),controller['index']);router[_0xfe67('0xa')](_0xfe67('0xc'),auth[_0xfe67('0xb')](),controller[_0xfe67('0xd')]);router['get'](_0xfe67('0xe'),auth[_0xfe67('0xb')](),controller['download']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x93e461,_0x52cc38,_0x5b4ba3){_0x5b4ba3(null,path['join'](config[_0xfe67('0xf')],'server/files/sounds/original/'));},'filename':function(_0x2eb325,_0x3ca085,_0x3b79c0){_0x3ca085[_0xfe67('0x10')]=_0x3ca085[_0xfe67('0x10')][_0xfe67('0x11')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x3b79c0(null,util[_0xfe67('0x12')](_0xfe67('0x13'),path['basename'](_0x3ca085[_0xfe67('0x10')],path['extname'](_0x3ca085[_0xfe67('0x10')])),Date[_0xfe67('0x14')](),path[_0xfe67('0x15')](_0x3ca085[_0xfe67('0x10')])));}})});router[_0xfe67('0x16')]('/',upload['single'](_0xfe67('0x17')),controller['create']);router[_0xfe67('0x18')](_0xfe67('0xc'),auth[_0xfe67('0xb')](),controller[_0xfe67('0x19')]);router[_0xfe67('0x1a')](_0xfe67('0xc'),auth[_0xfe67('0xb')](),controller[_0xfe67('0x1a')]);module['exports']=router;
\ No newline at end of file