Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / sound / index.js
index 1e7c203..7d0118a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8b7e=['fs-extra','../../components/auth/service','../../config/environment','./sound.controller','isAuthenticated','index','get','/:id','show','/:id/download','download','diskStorage','join','root','server/files/sounds/original/','originalname','replace','format','%s-%s%s','now','post','single','file','create','update','delete','exports','multer','path','connect-timeout','express','Router'];(function(_0x1da527,_0x2dc953){var _0x40fc7c=function(_0x9949f5){while(--_0x9949f5){_0x1da527['push'](_0x1da527['shift']());}};_0x40fc7c(++_0x2dc953);}(_0x8b7e,0x13b));var _0xe8b7=function(_0x2902c5,_0x390089){_0x2902c5=_0x2902c5-0x0;var _0x491699=_0x8b7e[_0x2902c5];return _0x491699;};'use strict';var multer=require(_0xe8b7('0x0'));var util=require('util');var path=require(_0xe8b7('0x1'));var timeout=require(_0xe8b7('0x2'));var express=require(_0xe8b7('0x3'));var router=express[_0xe8b7('0x4')]();var fs_extra=require(_0xe8b7('0x5'));var auth=require(_0xe8b7('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xe8b7('0x7'));var controller=require(_0xe8b7('0x8'));router['get']('/',auth[_0xe8b7('0x9')](),controller[_0xe8b7('0xa')]);router[_0xe8b7('0xb')](_0xe8b7('0xc'),auth[_0xe8b7('0x9')](),controller[_0xe8b7('0xd')]);router[_0xe8b7('0xb')](_0xe8b7('0xe'),auth[_0xe8b7('0x9')](),controller[_0xe8b7('0xf')]);var upload=multer({'storage':multer[_0xe8b7('0x10')]({'destination':function(_0x38253a,_0x4ad1ea,_0x11fc87){_0x11fc87(null,path[_0xe8b7('0x11')](config[_0xe8b7('0x12')],_0xe8b7('0x13')));},'filename':function(_0x44fd68,_0x398da7,_0x4013b7){_0x398da7[_0xe8b7('0x14')]=_0x398da7[_0xe8b7('0x14')][_0xe8b7('0x15')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x4013b7(null,util[_0xe8b7('0x16')](_0xe8b7('0x17'),path['basename'](_0x398da7[_0xe8b7('0x14')],path['extname'](_0x398da7[_0xe8b7('0x14')])),Date[_0xe8b7('0x18')](),path['extname'](_0x398da7[_0xe8b7('0x14')])));}})});router[_0xe8b7('0x19')]('/',upload[_0xe8b7('0x1a')](_0xe8b7('0x1b')),controller[_0xe8b7('0x1c')]);router['put'](_0xe8b7('0xc'),auth[_0xe8b7('0x9')](),controller[_0xe8b7('0x1d')]);router['delete'](_0xe8b7('0xc'),auth[_0xe8b7('0x9')](),controller[_0xe8b7('0x1e')]);module[_0xe8b7('0x1f')]=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