Built motion from commit 47436d59.|2.6.7
[motion2.git] / server / api / plugin / index.js
index fe37bf7..d5cb6be 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa7ff=['%s-%s%s','basename','extname','now','post','single','file','upload','webhookPost','put','delete','exports','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./plugin.controller','get','isAuthenticated','index','/webhook','webhookGet','/:id','show','download','diskStorage','join','root','server/files/plugins','originalname','replace','format'];(function(_0x455b12,_0x10ab4a){var _0x4ded00=function(_0x30b35a){while(--_0x30b35a){_0x455b12['push'](_0x455b12['shift']());}};_0x4ded00(++_0x10ab4a);}(_0xa7ff,0x182));var _0xfa7f=function(_0x3070dc,_0x40cf11){_0x3070dc=_0x3070dc-0x0;var _0x431489=_0xa7ff[_0x3070dc];return _0x431489;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xfa7f('0x0'));var timeout=require(_0xfa7f('0x1'));var express=require(_0xfa7f('0x2'));var router=express[_0xfa7f('0x3')]();var auth=require(_0xfa7f('0x4'));var interaction=require(_0xfa7f('0x5'));var config=require('../../config/environment');var controller=require(_0xfa7f('0x6'));router[_0xfa7f('0x7')]('/',auth[_0xfa7f('0x8')](),controller[_0xfa7f('0x9')]);router[_0xfa7f('0x7')](_0xfa7f('0xa'),controller[_0xfa7f('0xb')]);router[_0xfa7f('0x7')](_0xfa7f('0xc'),auth[_0xfa7f('0x8')](),controller[_0xfa7f('0xd')]);router[_0xfa7f('0x7')]('/:id/download',auth['isAuthenticated'](),controller[_0xfa7f('0xe')]);var upload=multer({'storage':multer[_0xfa7f('0xf')]({'destination':function(_0x46b71c,_0x5c9eb7,_0x39e083){_0x39e083(null,path[_0xfa7f('0x10')](config[_0xfa7f('0x11')],_0xfa7f('0x12')));},'filename':function(_0x1605d5,_0x15124a,_0x3c450d){_0x15124a[_0xfa7f('0x13')]=_0x15124a[_0xfa7f('0x13')][_0xfa7f('0x14')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x3c450d(null,util[_0xfa7f('0x15')](_0xfa7f('0x16'),path[_0xfa7f('0x17')](_0x15124a['originalname'],path[_0xfa7f('0x18')](_0x15124a[_0xfa7f('0x13')])),Date[_0xfa7f('0x19')](),path[_0xfa7f('0x18')](_0x15124a[_0xfa7f('0x13')])));}})});router[_0xfa7f('0x1a')]('/',upload[_0xfa7f('0x1b')](_0xfa7f('0x1c')),controller[_0xfa7f('0x1d')]);router[_0xfa7f('0x1a')]('/webhook',controller[_0xfa7f('0x1e')]);router[_0xfa7f('0x1f')](_0xfa7f('0xc'),auth[_0xfa7f('0x8')](),controller['update']);router[_0xfa7f('0x20')](_0xfa7f('0xc'),auth['isAuthenticated'](),controller['delete']);module[_0xfa7f('0x21')]=router;
\ No newline at end of file
+var _0x0ba7=['../../config/environment','./plugin.controller','get','isAuthenticated','index','/webhook','webhookGet','/:id','show','diskStorage','server/files/plugins','originalname','format','basename','extname','now','post','single','file','upload','webhookPost','update','delete','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service'];(function(_0x464d24,_0x3ef7b4){var _0x47667e=function(_0xb2b4e6){while(--_0xb2b4e6){_0x464d24['push'](_0x464d24['shift']());}};_0x47667e(++_0x3ef7b4);}(_0x0ba7,0x16d));var _0x70ba=function(_0x479bc7,_0x36cf47){_0x479bc7=_0x479bc7-0x0;var _0x159af3=_0x0ba7[_0x479bc7];return _0x159af3;};'use strict';var multer=require(_0x70ba('0x0'));var util=require('util');var path=require(_0x70ba('0x1'));var timeout=require(_0x70ba('0x2'));var express=require(_0x70ba('0x3'));var router=express[_0x70ba('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x70ba('0x5'));var interaction=require(_0x70ba('0x6'));var config=require(_0x70ba('0x7'));var controller=require(_0x70ba('0x8'));router[_0x70ba('0x9')]('/',auth[_0x70ba('0xa')](),controller[_0x70ba('0xb')]);router[_0x70ba('0x9')](_0x70ba('0xc'),controller[_0x70ba('0xd')]);router[_0x70ba('0x9')](_0x70ba('0xe'),auth[_0x70ba('0xa')](),controller[_0x70ba('0xf')]);router[_0x70ba('0x9')]('/:id/download',auth[_0x70ba('0xa')](),controller['download']);var upload=multer({'storage':multer[_0x70ba('0x10')]({'destination':function(_0x258604,_0xfc4de3,_0x3cf8ab){_0x3cf8ab(null,path['join'](config['root'],_0x70ba('0x11')));},'filename':function(_0x4a2c2e,_0xd6580e,_0x5e94c7){_0xd6580e[_0x70ba('0x12')]=_0xd6580e[_0x70ba('0x12')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x5e94c7(null,util[_0x70ba('0x13')]('%s-%s%s',path[_0x70ba('0x14')](_0xd6580e[_0x70ba('0x12')],path[_0x70ba('0x15')](_0xd6580e[_0x70ba('0x12')])),Date[_0x70ba('0x16')](),path[_0x70ba('0x15')](_0xd6580e[_0x70ba('0x12')])));}})});router[_0x70ba('0x17')]('/',upload[_0x70ba('0x18')](_0x70ba('0x19')),controller[_0x70ba('0x1a')]);router[_0x70ba('0x17')](_0x70ba('0xc'),controller[_0x70ba('0x1b')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0x70ba('0x1c')]);router[_0x70ba('0x1d')](_0x70ba('0xe'),auth[_0x70ba('0xa')](),controller[_0x70ba('0x1d')]);module[_0x70ba('0x1e')]=router;
\ No newline at end of file