Built motion from commit 47436d59.|2.6.7
[motion2.git] / server / api / plugin / index.js
index 140f934..d5cb6be 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6ea8=['diskStorage','join','originalname','replace','format','%s-%s%s','extname','now','single','upload','post','delete','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','./plugin.controller','isAuthenticated','index','/webhook','webhookGet','get','/:id','show','/:id/download','download'];(function(_0x322ac3,_0x53c678){var _0x1337cb=function(_0x26ea74){while(--_0x26ea74){_0x322ac3['push'](_0x322ac3['shift']());}};_0x1337cb(++_0x53c678);}(_0x6ea8,0x157));var _0x86ea=function(_0x30bd4d,_0x50eb60){_0x30bd4d=_0x30bd4d-0x0;var _0x306915=_0x6ea8[_0x30bd4d];return _0x306915;};'use strict';var multer=require(_0x86ea('0x0'));var util=require(_0x86ea('0x1'));var path=require(_0x86ea('0x2'));var timeout=require(_0x86ea('0x3'));var express=require(_0x86ea('0x4'));var router=express[_0x86ea('0x5')]();var auth=require(_0x86ea('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x86ea('0x7'));router['get']('/',auth[_0x86ea('0x8')](),controller[_0x86ea('0x9')]);router['get'](_0x86ea('0xa'),controller[_0x86ea('0xb')]);router[_0x86ea('0xc')](_0x86ea('0xd'),auth[_0x86ea('0x8')](),controller[_0x86ea('0xe')]);router[_0x86ea('0xc')](_0x86ea('0xf'),auth[_0x86ea('0x8')](),controller[_0x86ea('0x10')]);var upload=multer({'storage':multer[_0x86ea('0x11')]({'destination':function(_0x3b97e4,_0x45d326,_0x2b950e){_0x2b950e(null,path[_0x86ea('0x12')](config['root'],'server/files/plugins'));},'filename':function(_0x1a6cde,_0x14d146,_0x3ab80c){_0x14d146[_0x86ea('0x13')]=_0x14d146['originalname'][_0x86ea('0x14')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x3ab80c(null,util[_0x86ea('0x15')](_0x86ea('0x16'),path['basename'](_0x14d146['originalname'],path[_0x86ea('0x17')](_0x14d146[_0x86ea('0x13')])),Date[_0x86ea('0x18')](),path[_0x86ea('0x17')](_0x14d146[_0x86ea('0x13')])));}})});router['post']('/',upload[_0x86ea('0x19')]('file'),controller[_0x86ea('0x1a')]);router[_0x86ea('0x1b')](_0x86ea('0xa'),controller['webhookPost']);router['put'](_0x86ea('0xd'),auth[_0x86ea('0x8')](),controller['update']);router[_0x86ea('0x1c')]('/:id',auth[_0x86ea('0x8')](),controller[_0x86ea('0x1c')]);module[_0x86ea('0x1d')]=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