Built motion from commit 87cd5f02.|2.5.48
[motion2.git] / server / api / plugin / index.js
index c511dac..3ac9409 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x81bd=['diskStorage','join','root','server/files/plugins','originalname','format','basename','extname','now','post','file','upload','/webhook','webhookPost','put','/:id','update','delete','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./plugin.controller','isAuthenticated','index','get','show','/:id/download','download'];(function(_0x40220a,_0x22feb1){var _0x3903cc=function(_0x33a296){while(--_0x33a296){_0x40220a['push'](_0x40220a['shift']());}};_0x3903cc(++_0x22feb1);}(_0x81bd,0x7c));var _0xd81b=function(_0x2e2910,_0x3b06e0){_0x2e2910=_0x2e2910-0x0;var _0x22e05c=_0x81bd[_0x2e2910];return _0x22e05c;};'use strict';var multer=require(_0xd81b('0x0'));var util=require(_0xd81b('0x1'));var path=require(_0xd81b('0x2'));var timeout=require(_0xd81b('0x3'));var express=require(_0xd81b('0x4'));var router=express[_0xd81b('0x5')]();var fs_extra=require(_0xd81b('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0xd81b('0x7'));var config=require(_0xd81b('0x8'));var controller=require(_0xd81b('0x9'));router['get']('/',auth[_0xd81b('0xa')](),controller[_0xd81b('0xb')]);router[_0xd81b('0xc')]('/webhook',controller['webhookGet']);router[_0xd81b('0xc')]('/:id',auth[_0xd81b('0xa')](),controller[_0xd81b('0xd')]);router[_0xd81b('0xc')](_0xd81b('0xe'),auth[_0xd81b('0xa')](),controller[_0xd81b('0xf')]);var upload=multer({'storage':multer[_0xd81b('0x10')]({'destination':function(_0x17e09f,_0x2090e1,_0x23c789){_0x23c789(null,path[_0xd81b('0x11')](config[_0xd81b('0x12')],_0xd81b('0x13')));},'filename':function(_0x560530,_0x21dfff,_0x57f71d){_0x21dfff[_0xd81b('0x14')]=_0x21dfff[_0xd81b('0x14')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x57f71d(null,util[_0xd81b('0x15')]('%s-%s%s',path[_0xd81b('0x16')](_0x21dfff[_0xd81b('0x14')],path[_0xd81b('0x17')](_0x21dfff[_0xd81b('0x14')])),Date[_0xd81b('0x18')](),path['extname'](_0x21dfff[_0xd81b('0x14')])));}})});router[_0xd81b('0x19')]('/',upload['single'](_0xd81b('0x1a')),controller[_0xd81b('0x1b')]);router[_0xd81b('0x19')](_0xd81b('0x1c'),controller[_0xd81b('0x1d')]);router[_0xd81b('0x1e')](_0xd81b('0x1f'),auth[_0xd81b('0xa')](),controller[_0xd81b('0x20')]);router[_0xd81b('0x21')](_0xd81b('0x1f'),auth[_0xd81b('0xa')](),controller[_0xd81b('0x21')]);module[_0xd81b('0x22')]=router;
\ No newline at end of file
+var _0x0bde=['originalname','replace','format','%s-%s%s','basename','extname','post','single','file','upload','put','update','delete','exports','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./plugin.controller','get','isAuthenticated','index','/webhook','/:id','show','/:id/download','download','server/files/plugins'];(function(_0x4acfc2,_0x74535b){var _0x25dd57=function(_0x16870e){while(--_0x16870e){_0x4acfc2['push'](_0x4acfc2['shift']());}};_0x25dd57(++_0x74535b);}(_0x0bde,0xe7));var _0xe0bd=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x0bde[_0x321bb2];return _0x9c12ed;};'use strict';var multer=require('multer');var util=require(_0xe0bd('0x0'));var path=require('path');var timeout=require(_0xe0bd('0x1'));var express=require(_0xe0bd('0x2'));var router=express[_0xe0bd('0x3')]();var fs_extra=require(_0xe0bd('0x4'));var auth=require(_0xe0bd('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xe0bd('0x6'));var controller=require(_0xe0bd('0x7'));router[_0xe0bd('0x8')]('/',auth[_0xe0bd('0x9')](),controller[_0xe0bd('0xa')]);router[_0xe0bd('0x8')](_0xe0bd('0xb'),controller['webhookGet']);router[_0xe0bd('0x8')](_0xe0bd('0xc'),auth[_0xe0bd('0x9')](),controller[_0xe0bd('0xd')]);router[_0xe0bd('0x8')](_0xe0bd('0xe'),auth[_0xe0bd('0x9')](),controller[_0xe0bd('0xf')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x595dac,_0x47f96d,_0x44ffa9){_0x44ffa9(null,path['join'](config['root'],_0xe0bd('0x10')));},'filename':function(_0x415093,_0x54d40e,_0xc492b4){_0x54d40e['originalname']=_0x54d40e[_0xe0bd('0x11')][_0xe0bd('0x12')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0xc492b4(null,util[_0xe0bd('0x13')](_0xe0bd('0x14'),path[_0xe0bd('0x15')](_0x54d40e[_0xe0bd('0x11')],path[_0xe0bd('0x16')](_0x54d40e[_0xe0bd('0x11')])),Date['now'](),path['extname'](_0x54d40e['originalname'])));}})});router[_0xe0bd('0x17')]('/',upload[_0xe0bd('0x18')](_0xe0bd('0x19')),controller[_0xe0bd('0x1a')]);router[_0xe0bd('0x17')]('/webhook',controller['webhookPost']);router[_0xe0bd('0x1b')]('/:id',auth[_0xe0bd('0x9')](),controller[_0xe0bd('0x1c')]);router[_0xe0bd('0x1d')](_0xe0bd('0xc'),auth['isAuthenticated'](),controller[_0xe0bd('0x1d')]);module[_0xe0bd('0x1e')]=router;
\ No newline at end of file