Built motion from commit (unavailable).|2.3.4
[motion2.git] / server / api / plugin / index.js
index a770e51..f1b6508 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0a29=['diskStorage','join','server/files/plugins','originalname','replace','format','%s-%s%s','basename','now','extname','single','upload','post','/webhook','webhookPost','update','delete','multer','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','get','webhookGet','/:id','show','/:id/download','download'];(function(_0x1857c6,_0x48840c){var _0x51011c=function(_0x3a4736){while(--_0x3a4736){_0x1857c6['push'](_0x1857c6['shift']());}};_0x51011c(++_0x48840c);}(_0x0a29,0x166));var _0x90a2=function(_0x2992b2,_0x4d39aa){_0x2992b2=_0x2992b2-0x0;var _0x58a8a9=_0x0a29[_0x2992b2];return _0x58a8a9;};'use strict';var multer=require(_0x90a2('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x90a2('0x1'));var express=require(_0x90a2('0x2'));var router=express[_0x90a2('0x3')]();var auth=require(_0x90a2('0x4'));var interaction=require(_0x90a2('0x5'));var config=require(_0x90a2('0x6'));var controller=require('./plugin.controller');router['get']('/',auth[_0x90a2('0x7')](),controller['index']);router[_0x90a2('0x8')]('/webhook',controller[_0x90a2('0x9')]);router['get'](_0x90a2('0xa'),auth[_0x90a2('0x7')](),controller[_0x90a2('0xb')]);router[_0x90a2('0x8')](_0x90a2('0xc'),auth['isAuthenticated'](),controller[_0x90a2('0xd')]);var upload=multer({'storage':multer[_0x90a2('0xe')]({'destination':function(_0x555b72,_0x355eb2,_0x3347c7){_0x3347c7(null,path[_0x90a2('0xf')](config['root'],_0x90a2('0x10')));},'filename':function(_0x550be2,_0x2cbbe5,_0x3d1ba9){_0x2cbbe5[_0x90a2('0x11')]=_0x2cbbe5['originalname'][_0x90a2('0x12')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x3d1ba9(null,util[_0x90a2('0x13')](_0x90a2('0x14'),path[_0x90a2('0x15')](_0x2cbbe5[_0x90a2('0x11')],path['extname'](_0x2cbbe5[_0x90a2('0x11')])),Date[_0x90a2('0x16')](),path[_0x90a2('0x17')](_0x2cbbe5['originalname'])));}})});router['post']('/',upload[_0x90a2('0x18')]('file'),controller[_0x90a2('0x19')]);router[_0x90a2('0x1a')](_0x90a2('0x1b'),controller[_0x90a2('0x1c')]);router['put'](_0x90a2('0xa'),auth[_0x90a2('0x7')](),controller[_0x90a2('0x1d')]);router[_0x90a2('0x1e')](_0x90a2('0xa'),auth[_0x90a2('0x7')](),controller['delete']);module['exports']=router;
\ No newline at end of file
+var _0xcfc7=['../../components/auth/service','../../components/interaction/service','../../config/environment','./plugin.controller','get','isAuthenticated','index','/webhook','/:id','/:id/download','download','root','server/files/plugins','originalname','replace','format','%s-%s%s','basename','extname','now','single','file','upload','post','webhookPost','put','multer','util','path','connect-timeout','express','Router'];(function(_0x5d3eb1,_0x56beb3){var _0x2f3d1e=function(_0x1d7f4e){while(--_0x1d7f4e){_0x5d3eb1['push'](_0x5d3eb1['shift']());}};_0x2f3d1e(++_0x56beb3);}(_0xcfc7,0x19a));var _0x7cfc=function(_0x27a077,_0x120652){_0x27a077=_0x27a077-0x0;var _0x3b9ddf=_0xcfc7[_0x27a077];return _0x3b9ddf;};'use strict';var multer=require(_0x7cfc('0x0'));var util=require(_0x7cfc('0x1'));var path=require(_0x7cfc('0x2'));var timeout=require(_0x7cfc('0x3'));var express=require(_0x7cfc('0x4'));var router=express[_0x7cfc('0x5')]();var auth=require(_0x7cfc('0x6'));var interaction=require(_0x7cfc('0x7'));var config=require(_0x7cfc('0x8'));var controller=require(_0x7cfc('0x9'));router[_0x7cfc('0xa')]('/',auth[_0x7cfc('0xb')](),controller[_0x7cfc('0xc')]);router[_0x7cfc('0xa')](_0x7cfc('0xd'),controller['webhookGet']);router[_0x7cfc('0xa')](_0x7cfc('0xe'),auth[_0x7cfc('0xb')](),controller['show']);router[_0x7cfc('0xa')](_0x7cfc('0xf'),auth['isAuthenticated'](),controller[_0x7cfc('0x10')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x5ac1fd,_0x1926ee,_0xd71062){_0xd71062(null,path['join'](config[_0x7cfc('0x11')],_0x7cfc('0x12')));},'filename':function(_0x171a8c,_0x19151d,_0x2ae29b){_0x19151d[_0x7cfc('0x13')]=_0x19151d[_0x7cfc('0x13')][_0x7cfc('0x14')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x2ae29b(null,util[_0x7cfc('0x15')](_0x7cfc('0x16'),path[_0x7cfc('0x17')](_0x19151d['originalname'],path[_0x7cfc('0x18')](_0x19151d[_0x7cfc('0x13')])),Date[_0x7cfc('0x19')](),path['extname'](_0x19151d[_0x7cfc('0x13')])));}})});router['post']('/',upload[_0x7cfc('0x1a')](_0x7cfc('0x1b')),controller[_0x7cfc('0x1c')]);router[_0x7cfc('0x1d')](_0x7cfc('0xd'),controller[_0x7cfc('0x1e')]);router[_0x7cfc('0x1f')](_0x7cfc('0xe'),auth[_0x7cfc('0xb')](),controller['update']);router['delete']('/:id',auth['isAuthenticated'](),controller['delete']);module['exports']=router;
\ No newline at end of file