Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / sound / index.js
index 7d0118a..2d00391 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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
+var _0x40d0=['put','delete','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','./sound.controller','get','index','/:id','isAuthenticated','/:id/download','download','diskStorage','join','root','server/files/sounds/original/','originalname','replace','format','basename','extname','post','single','file','create'];(function(_0x490be3,_0xf0fca3){var _0x3f5140=function(_0x15fa80){while(--_0x15fa80){_0x490be3['push'](_0x490be3['shift']());}};_0x3f5140(++_0xf0fca3);}(_0x40d0,0x14c));var _0x040d=function(_0x1f0a78,_0x54ae1f){_0x1f0a78=_0x1f0a78-0x0;var _0x2a706d=_0x40d0[_0x1f0a78];return _0x2a706d;};'use strict';var multer=require(_0x040d('0x0'));var util=require(_0x040d('0x1'));var path=require(_0x040d('0x2'));var timeout=require(_0x040d('0x3'));var express=require(_0x040d('0x4'));var router=express[_0x040d('0x5')]();var fs_extra=require(_0x040d('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0x040d('0x7'));var config=require('../../config/environment');var controller=require(_0x040d('0x8'));router[_0x040d('0x9')]('/',auth['isAuthenticated'](),controller[_0x040d('0xa')]);router[_0x040d('0x9')](_0x040d('0xb'),auth[_0x040d('0xc')](),controller['show']);router[_0x040d('0x9')](_0x040d('0xd'),auth[_0x040d('0xc')](),controller[_0x040d('0xe')]);var upload=multer({'storage':multer[_0x040d('0xf')]({'destination':function(_0x88f75d,_0x49df2c,_0x1d6735){_0x1d6735(null,path[_0x040d('0x10')](config[_0x040d('0x11')],_0x040d('0x12')));},'filename':function(_0x1c08e2,_0xdae78e,_0x1ac740){_0xdae78e['originalname']=_0xdae78e[_0x040d('0x13')][_0x040d('0x14')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x1ac740(null,util[_0x040d('0x15')]('%s-%s%s',path[_0x040d('0x16')](_0xdae78e[_0x040d('0x13')],path['extname'](_0xdae78e[_0x040d('0x13')])),Date['now'](),path[_0x040d('0x17')](_0xdae78e[_0x040d('0x13')])));}})});router[_0x040d('0x18')]('/',upload[_0x040d('0x19')](_0x040d('0x1a')),controller[_0x040d('0x1b')]);router[_0x040d('0x1c')](_0x040d('0xb'),auth[_0x040d('0xc')](),controller['update']);router['delete']('/:id',auth[_0x040d('0xc')](),controller[_0x040d('0x1d')]);module['exports']=router;
\ No newline at end of file