Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / sound / index.js
index 9799270..7d0118a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa4cc=['delete','exports','multer','util','path','express','Router','../../components/interaction/service','../../config/environment','./sound.controller','get','index','/:id','isAuthenticated','/:id/download','download','join','root','originalname','replace','format','%s-%s%s','basename','now','extname','post','update'];(function(_0x103077,_0x55a8b2){var _0x260e26=function(_0x4c57e){while(--_0x4c57e){_0x103077['push'](_0x103077['shift']());}};_0x260e26(++_0x55a8b2);}(_0xa4cc,0x110));var _0xca4c=function(_0x2de292,_0x50639c){_0x2de292=_0x2de292-0x0;var _0x1d59a9=_0xa4cc[_0x2de292];return _0x1d59a9;};'use strict';var multer=require(_0xca4c('0x0'));var util=require(_0xca4c('0x1'));var path=require(_0xca4c('0x2'));var timeout=require('connect-timeout');var express=require(_0xca4c('0x3'));var router=express[_0xca4c('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0xca4c('0x5'));var config=require(_0xca4c('0x6'));var controller=require(_0xca4c('0x7'));router[_0xca4c('0x8')]('/',auth['isAuthenticated'](),controller[_0xca4c('0x9')]);router[_0xca4c('0x8')](_0xca4c('0xa'),auth[_0xca4c('0xb')](),controller['show']);router['get'](_0xca4c('0xc'),auth[_0xca4c('0xb')](),controller[_0xca4c('0xd')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x460ee8,_0x497882,_0x3b97d9){_0x3b97d9(null,path[_0xca4c('0xe')](config[_0xca4c('0xf')],'server/files/sounds/original/'));},'filename':function(_0x5a2756,_0x2bcb6c,_0x544d28){_0x2bcb6c['originalname']=_0x2bcb6c[_0xca4c('0x10')][_0xca4c('0x11')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x544d28(null,util[_0xca4c('0x12')](_0xca4c('0x13'),path[_0xca4c('0x14')](_0x2bcb6c[_0xca4c('0x10')],path['extname'](_0x2bcb6c[_0xca4c('0x10')])),Date[_0xca4c('0x15')](),path[_0xca4c('0x16')](_0x2bcb6c[_0xca4c('0x10')])));}})});router[_0xca4c('0x17')]('/',upload['single']('file'),controller['create']);router['put'](_0xca4c('0xa'),auth[_0xca4c('0xb')](),controller[_0xca4c('0x18')]);router[_0xca4c('0x19')](_0xca4c('0xa'),auth['isAuthenticated'](),controller[_0xca4c('0x19')]);module[_0xca4c('0x1a')]=router;
\ No newline at end of file
+var _0x972b=['exports','multer','util','path','connect-timeout','express','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','/:id/download','download','diskStorage','join','root','server/files/sounds/original/','originalname','replace','%s-%s%s','basename','extname','now','post','file','create','put','delete'];(function(_0xd2d54,_0x5329f7){var _0x78b113=function(_0x7d2b29){while(--_0x7d2b29){_0xd2d54['push'](_0xd2d54['shift']());}};_0x78b113(++_0x5329f7);}(_0x972b,0x75));var _0xb972=function(_0x3c8843,_0xeb83f5){_0x3c8843=_0x3c8843-0x0;var _0x1db153=_0x972b[_0x3c8843];return _0x1db153;};'use strict';var multer=require(_0xb972('0x0'));var util=require(_0xb972('0x1'));var path=require(_0xb972('0x2'));var timeout=require(_0xb972('0x3'));var express=require(_0xb972('0x4'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xb972('0x5'));var config=require(_0xb972('0x6'));var controller=require('./sound.controller');router[_0xb972('0x7')]('/',auth[_0xb972('0x8')](),controller[_0xb972('0x9')]);router[_0xb972('0x7')](_0xb972('0xa'),auth['isAuthenticated'](),controller['show']);router['get'](_0xb972('0xb'),auth[_0xb972('0x8')](),controller[_0xb972('0xc')]);var upload=multer({'storage':multer[_0xb972('0xd')]({'destination':function(_0x1aa134,_0x34a088,_0x432c21){_0x432c21(null,path[_0xb972('0xe')](config[_0xb972('0xf')],_0xb972('0x10')));},'filename':function(_0x5cc983,_0x1b767c,_0x18f30b){_0x1b767c[_0xb972('0x11')]=_0x1b767c['originalname'][_0xb972('0x12')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x18f30b(null,util['format'](_0xb972('0x13'),path[_0xb972('0x14')](_0x1b767c['originalname'],path[_0xb972('0x15')](_0x1b767c[_0xb972('0x11')])),Date[_0xb972('0x16')](),path[_0xb972('0x15')](_0x1b767c[_0xb972('0x11')])));}})});router[_0xb972('0x17')]('/',upload['single'](_0xb972('0x18')),controller[_0xb972('0x19')]);router[_0xb972('0x1a')](_0xb972('0xa'),auth[_0xb972('0x8')](),controller['update']);router[_0xb972('0x1b')](_0xb972('0xa'),auth[_0xb972('0x8')](),controller['delete']);module[_0xb972('0x1c')]=router;
\ No newline at end of file