Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / api / sound / index.js
index 3605b8c..a80466a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd8c9=['now','post','single','put','update','delete','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./sound.controller','get','/:id','isAuthenticated','download','join','root','server/files/sounds/original/','originalname','replace','format','%s-%s%s','extname'];(function(_0xa1e3e3,_0x29fe0e){var _0xc980e9=function(_0x1f5adc){while(--_0x1f5adc){_0xa1e3e3['push'](_0xa1e3e3['shift']());}};_0xc980e9(++_0x29fe0e);}(_0xd8c9,0xc3));var _0x9d8c=function(_0xe1e236,_0x2aa415){_0xe1e236=_0xe1e236-0x0;var _0x1855f3=_0xd8c9[_0xe1e236];return _0x1855f3;};'use strict';var multer=require(_0x9d8c('0x0'));var util=require(_0x9d8c('0x1'));var path=require(_0x9d8c('0x2'));var timeout=require(_0x9d8c('0x3'));var express=require(_0x9d8c('0x4'));var router=express[_0x9d8c('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x9d8c('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x9d8c('0x7'));var controller=require(_0x9d8c('0x8'));router['get']('/',auth['isAuthenticated'](),controller['index']);router[_0x9d8c('0x9')](_0x9d8c('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x9d8c('0x9')]('/:id/download',auth[_0x9d8c('0xb')](),controller[_0x9d8c('0xc')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x377af4,_0x13efe0,_0x693b70){_0x693b70(null,path[_0x9d8c('0xd')](config[_0x9d8c('0xe')],_0x9d8c('0xf')));},'filename':function(_0x728776,_0x6fc417,_0x3c10da){_0x6fc417[_0x9d8c('0x10')]=_0x6fc417[_0x9d8c('0x10')][_0x9d8c('0x11')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x3c10da(null,util[_0x9d8c('0x12')](_0x9d8c('0x13'),path['basename'](_0x6fc417['originalname'],path[_0x9d8c('0x14')](_0x6fc417[_0x9d8c('0x10')])),Date[_0x9d8c('0x15')](),path[_0x9d8c('0x14')](_0x6fc417[_0x9d8c('0x10')])));}})});router[_0x9d8c('0x16')]('/',upload[_0x9d8c('0x17')]('file'),controller['create']);router[_0x9d8c('0x18')](_0x9d8c('0xa'),auth[_0x9d8c('0xb')](),controller[_0x9d8c('0x19')]);router[_0x9d8c('0x1a')](_0x9d8c('0xa'),auth[_0x9d8c('0xb')](),controller[_0x9d8c('0x1a')]);module['exports']=router;
\ No newline at end of file
+var _0x8d8c=['replace','format','%s-%s%s','basename','extname','now','post','single','file','create','update','delete','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','get','/:id','show','diskStorage','root','originalname'];(function(_0x8c43de,_0x90ff31){var _0xa6591b=function(_0x469716){while(--_0x469716){_0x8c43de['push'](_0x8c43de['shift']());}};_0xa6591b(++_0x90ff31);}(_0x8d8c,0x1dd));var _0xc8d8=function(_0x18e014,_0x593ba7){_0x18e014=_0x18e014-0x0;var _0x858ce3=_0x8d8c[_0x18e014];return _0x858ce3;};'use strict';var multer=require(_0xc8d8('0x0'));var util=require(_0xc8d8('0x1'));var path=require('path');var timeout=require(_0xc8d8('0x2'));var express=require(_0xc8d8('0x3'));var router=express[_0xc8d8('0x4')]();var fs_extra=require(_0xc8d8('0x5'));var auth=require(_0xc8d8('0x6'));var interaction=require(_0xc8d8('0x7'));var config=require(_0xc8d8('0x8'));var controller=require('./sound.controller');router['get']('/',auth[_0xc8d8('0x9')](),controller['index']);router[_0xc8d8('0xa')](_0xc8d8('0xb'),auth[_0xc8d8('0x9')](),controller[_0xc8d8('0xc')]);router[_0xc8d8('0xa')]('/:id/download',auth['isAuthenticated'](),controller['download']);var upload=multer({'storage':multer[_0xc8d8('0xd')]({'destination':function(_0x1c66f9,_0x441e3d,_0x33ac8c){_0x33ac8c(null,path['join'](config[_0xc8d8('0xe')],'server/files/sounds/original/'));},'filename':function(_0x225694,_0x34a7fe,_0x41e01d){_0x34a7fe[_0xc8d8('0xf')]=_0x34a7fe['originalname'][_0xc8d8('0x10')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x41e01d(null,util[_0xc8d8('0x11')](_0xc8d8('0x12'),path[_0xc8d8('0x13')](_0x34a7fe[_0xc8d8('0xf')],path[_0xc8d8('0x14')](_0x34a7fe[_0xc8d8('0xf')])),Date[_0xc8d8('0x15')](),path['extname'](_0x34a7fe[_0xc8d8('0xf')])));}})});router[_0xc8d8('0x16')]('/',upload[_0xc8d8('0x17')](_0xc8d8('0x18')),controller[_0xc8d8('0x19')]);router['put'](_0xc8d8('0xb'),auth[_0xc8d8('0x9')](),controller[_0xc8d8('0x1a')]);router['delete'](_0xc8d8('0xb'),auth[_0xc8d8('0x9')](),controller[_0xc8d8('0x1b')]);module[_0xc8d8('0x1c')]=router;
\ No newline at end of file