Built motion from commit 5b761a7b.|2.5.36
[motion2.git] / server / api / sound / index.js
index 2783fd7..53ea216 100644 (file)
@@ -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 _0x509f=['/:id','delete','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./sound.controller','get','isAuthenticated','index','show','download','diskStorage','join','root','server/files/sounds/original/','originalname','%s-%s%s','basename','extname','post','single','file','create','put'];(function(_0x218f88,_0x43b7c8){var _0x4c7b6d=function(_0x546396){while(--_0x546396){_0x218f88['push'](_0x218f88['shift']());}};_0x4c7b6d(++_0x43b7c8);}(_0x509f,0x1b5));var _0xf509=function(_0x3d716b,_0x4af1f3){_0x3d716b=_0x3d716b-0x0;var _0x29f0eb=_0x509f[_0x3d716b];return _0x29f0eb;};'use strict';var multer=require('multer');var util=require(_0xf509('0x0'));var path=require(_0xf509('0x1'));var timeout=require(_0xf509('0x2'));var express=require('express');var router=express[_0xf509('0x3')]();var fs_extra=require(_0xf509('0x4'));var auth=require(_0xf509('0x5'));var interaction=require(_0xf509('0x6'));var config=require(_0xf509('0x7'));var controller=require(_0xf509('0x8'));router[_0xf509('0x9')]('/',auth[_0xf509('0xa')](),controller[_0xf509('0xb')]);router[_0xf509('0x9')]('/:id',auth[_0xf509('0xa')](),controller[_0xf509('0xc')]);router[_0xf509('0x9')]('/:id/download',auth[_0xf509('0xa')](),controller[_0xf509('0xd')]);var upload=multer({'storage':multer[_0xf509('0xe')]({'destination':function(_0x53b571,_0x2d4262,_0x339c52){_0x339c52(null,path[_0xf509('0xf')](config[_0xf509('0x10')],_0xf509('0x11')));},'filename':function(_0x459536,_0x8ce56e,_0x4da390){_0x8ce56e[_0xf509('0x12')]=_0x8ce56e[_0xf509('0x12')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x4da390(null,util['format'](_0xf509('0x13'),path[_0xf509('0x14')](_0x8ce56e[_0xf509('0x12')],path['extname'](_0x8ce56e[_0xf509('0x12')])),Date['now'](),path[_0xf509('0x15')](_0x8ce56e[_0xf509('0x12')])));}})});router[_0xf509('0x16')]('/',upload[_0xf509('0x17')](_0xf509('0x18')),controller[_0xf509('0x19')]);router[_0xf509('0x1a')](_0xf509('0x1b'),auth[_0xf509('0xa')](),controller['update']);router[_0xf509('0x1c')](_0xf509('0x1b'),auth['isAuthenticated'](),controller[_0xf509('0x1c')]);module['exports']=router;
\ No newline at end of file