Built motion from commit 0900f080.|2.5.45
[motion2.git] / server / api / plugin / index.js
index 5ef20e3..eca3277 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x50a6=['../../components/auth/service','../../components/interaction/service','./plugin.controller','index','get','/webhook','webhookGet','/:id','show','isAuthenticated','download','root','originalname','format','%s-%s%s','basename','extname','post','single','file','put','update','delete','exports','multer','util','express','fs-extra'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x50a6,0xa4));var _0x650a=function(_0x57014b,_0x360c0f){_0x57014b=_0x57014b-0x0;var _0x2b258a=_0x50a6[_0x57014b];return _0x2b258a;};'use strict';var multer=require(_0x650a('0x0'));var util=require(_0x650a('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x650a('0x2'));var router=express['Router']();var fs_extra=require(_0x650a('0x3'));var auth=require(_0x650a('0x4'));var interaction=require(_0x650a('0x5'));var config=require('../../config/environment');var controller=require(_0x650a('0x6'));router['get']('/',auth['isAuthenticated'](),controller[_0x650a('0x7')]);router[_0x650a('0x8')](_0x650a('0x9'),controller[_0x650a('0xa')]);router['get'](_0x650a('0xb'),auth['isAuthenticated'](),controller[_0x650a('0xc')]);router[_0x650a('0x8')]('/:id/download',auth[_0x650a('0xd')](),controller[_0x650a('0xe')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x3e2406,_0x526881,_0x142cdb){_0x142cdb(null,path['join'](config[_0x650a('0xf')],'server/files/plugins'));},'filename':function(_0x2f8bf8,_0x48077a,_0x33e73d){_0x48077a[_0x650a('0x10')]=_0x48077a[_0x650a('0x10')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x33e73d(null,util[_0x650a('0x11')](_0x650a('0x12'),path[_0x650a('0x13')](_0x48077a[_0x650a('0x10')],path[_0x650a('0x14')](_0x48077a[_0x650a('0x10')])),Date['now'](),path[_0x650a('0x14')](_0x48077a['originalname'])));}})});router[_0x650a('0x15')]('/',upload[_0x650a('0x16')](_0x650a('0x17')),controller['upload']);router['post']('/webhook',controller['webhookPost']);router[_0x650a('0x18')](_0x650a('0xb'),auth[_0x650a('0xd')](),controller[_0x650a('0x19')]);router[_0x650a('0x1a')]('/:id',auth['isAuthenticated'](),controller[_0x650a('0x1a')]);module[_0x650a('0x1b')]=router;
\ No newline at end of file
+var _0x9b9b=['single','file','webhookPost','put','delete','exports','util','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./plugin.controller','get','isAuthenticated','index','/webhook','webhookGet','/:id','/:id/download','download','root','server/files/plugins','originalname','format','basename','extname','now','post'];(function(_0x472351,_0x272e77){var _0x104310=function(_0x16b897){while(--_0x16b897){_0x472351['push'](_0x472351['shift']());}};_0x104310(++_0x272e77);}(_0x9b9b,0x114));var _0xb9b9=function(_0xcf098d,_0x1b9e69){_0xcf098d=_0xcf098d-0x0;var _0x99daff=_0x9b9b[_0xcf098d];return _0x99daff;};'use strict';var multer=require('multer');var util=require(_0xb9b9('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xb9b9('0x1'));var router=express[_0xb9b9('0x2')]();var fs_extra=require(_0xb9b9('0x3'));var auth=require(_0xb9b9('0x4'));var interaction=require(_0xb9b9('0x5'));var config=require(_0xb9b9('0x6'));var controller=require(_0xb9b9('0x7'));router[_0xb9b9('0x8')]('/',auth[_0xb9b9('0x9')](),controller[_0xb9b9('0xa')]);router[_0xb9b9('0x8')](_0xb9b9('0xb'),controller[_0xb9b9('0xc')]);router[_0xb9b9('0x8')](_0xb9b9('0xd'),auth[_0xb9b9('0x9')](),controller['show']);router['get'](_0xb9b9('0xe'),auth[_0xb9b9('0x9')](),controller[_0xb9b9('0xf')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x3949d0,_0x3b6bb9,_0x1122bb){_0x1122bb(null,path['join'](config[_0xb9b9('0x10')],_0xb9b9('0x11')));},'filename':function(_0xbc5a42,_0x26fa04,_0x230fea){_0x26fa04[_0xb9b9('0x12')]=_0x26fa04['originalname']['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x230fea(null,util[_0xb9b9('0x13')]('%s-%s%s',path[_0xb9b9('0x14')](_0x26fa04['originalname'],path[_0xb9b9('0x15')](_0x26fa04[_0xb9b9('0x12')])),Date[_0xb9b9('0x16')](),path[_0xb9b9('0x15')](_0x26fa04[_0xb9b9('0x12')])));}})});router[_0xb9b9('0x17')]('/',upload[_0xb9b9('0x18')](_0xb9b9('0x19')),controller['upload']);router[_0xb9b9('0x17')]('/webhook',controller[_0xb9b9('0x1a')]);router[_0xb9b9('0x1b')](_0xb9b9('0xd'),auth[_0xb9b9('0x9')](),controller['update']);router[_0xb9b9('0x1c')](_0xb9b9('0xd'),auth[_0xb9b9('0x9')](),controller[_0xb9b9('0x1c')]);module[_0xb9b9('0x1d')]=router;
\ No newline at end of file