Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / api / plugin / index.js
index d17d302..d73b076 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc69b=['replace','%s-%s%s','extname','file','/webhook','webhookPost','put','isAuthenticated','update','delete','util','express','Router','../../components/auth/service','../../components/interaction/service','./plugin.controller','get','index','webhookGet','/:id','show','diskStorage','join','root','server/files/plugins','originalname'];(function(_0x496e85,_0x3ff76b){var _0x1dd580=function(_0x4428a3){while(--_0x4428a3){_0x496e85['push'](_0x496e85['shift']());}};_0x1dd580(++_0x3ff76b);}(_0xc69b,0x72));var _0xbc69=function(_0x54b062,_0x264bb5){_0x54b062=_0x54b062-0x0;var _0x255e41=_0xc69b[_0x54b062];return _0x255e41;};'use strict';var multer=require('multer');var util=require(_0xbc69('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xbc69('0x1'));var router=express[_0xbc69('0x2')]();var auth=require(_0xbc69('0x3'));var interaction=require(_0xbc69('0x4'));var config=require('../../config/environment');var controller=require(_0xbc69('0x5'));router[_0xbc69('0x6')]('/',auth['isAuthenticated'](),controller[_0xbc69('0x7')]);router[_0xbc69('0x6')]('/webhook',controller[_0xbc69('0x8')]);router[_0xbc69('0x6')](_0xbc69('0x9'),auth['isAuthenticated'](),controller[_0xbc69('0xa')]);router[_0xbc69('0x6')]('/:id/download',auth['isAuthenticated'](),controller['download']);var upload=multer({'storage':multer[_0xbc69('0xb')]({'destination':function(_0x458e47,_0x25159b,_0x22ade7){_0x22ade7(null,path[_0xbc69('0xc')](config[_0xbc69('0xd')],_0xbc69('0xe')));},'filename':function(_0x40ca48,_0x1ab2d8,_0x4d4874){_0x1ab2d8[_0xbc69('0xf')]=_0x1ab2d8[_0xbc69('0xf')][_0xbc69('0x10')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x4d4874(null,util['format'](_0xbc69('0x11'),path['basename'](_0x1ab2d8['originalname'],path[_0xbc69('0x12')](_0x1ab2d8['originalname'])),Date['now'](),path[_0xbc69('0x12')](_0x1ab2d8[_0xbc69('0xf')])));}})});router['post']('/',upload['single'](_0xbc69('0x13')),controller['upload']);router['post'](_0xbc69('0x14'),controller[_0xbc69('0x15')]);router[_0xbc69('0x16')](_0xbc69('0x9'),auth[_0xbc69('0x17')](),controller[_0xbc69('0x18')]);router[_0xbc69('0x19')](_0xbc69('0x9'),auth['isAuthenticated'](),controller[_0xbc69('0x19')]);module['exports']=router;
\ No newline at end of file
+var _0xe171=['../../components/interaction/service','../../config/environment','get','/webhook','webhookGet','/:id','isAuthenticated','show','download','join','root','server/files/plugins','originalname','replace','format','%s-%s%s','extname','post','file','upload','webhookPost','update','delete','exports','multer','path','express','Router','../../components/auth/service'];(function(_0x37c22c,_0x28a70d){var _0x119d79=function(_0x243a13){while(--_0x243a13){_0x37c22c['push'](_0x37c22c['shift']());}};_0x119d79(++_0x28a70d);}(_0xe171,0x100));var _0x1e17=function(_0x39d9fe,_0x1a4dc5){_0x39d9fe=_0x39d9fe-0x0;var _0x4f4ab6=_0xe171[_0x39d9fe];return _0x4f4ab6;};'use strict';var multer=require(_0x1e17('0x0'));var util=require('util');var path=require(_0x1e17('0x1'));var timeout=require('connect-timeout');var express=require(_0x1e17('0x2'));var router=express[_0x1e17('0x3')]();var auth=require(_0x1e17('0x4'));var interaction=require(_0x1e17('0x5'));var config=require(_0x1e17('0x6'));var controller=require('./plugin.controller');router[_0x1e17('0x7')]('/',auth['isAuthenticated'](),controller['index']);router[_0x1e17('0x7')](_0x1e17('0x8'),controller[_0x1e17('0x9')]);router[_0x1e17('0x7')](_0x1e17('0xa'),auth[_0x1e17('0xb')](),controller[_0x1e17('0xc')]);router[_0x1e17('0x7')]('/:id/download',auth[_0x1e17('0xb')](),controller[_0x1e17('0xd')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x4afb56,_0x550bc8,_0x5a15df){_0x5a15df(null,path[_0x1e17('0xe')](config[_0x1e17('0xf')],_0x1e17('0x10')));},'filename':function(_0x4de5be,_0xfc9dae,_0x41db27){_0xfc9dae[_0x1e17('0x11')]=_0xfc9dae[_0x1e17('0x11')][_0x1e17('0x12')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x41db27(null,util[_0x1e17('0x13')](_0x1e17('0x14'),path['basename'](_0xfc9dae[_0x1e17('0x11')],path[_0x1e17('0x15')](_0xfc9dae[_0x1e17('0x11')])),Date['now'](),path['extname'](_0xfc9dae[_0x1e17('0x11')])));}})});router[_0x1e17('0x16')]('/',upload['single'](_0x1e17('0x17')),controller[_0x1e17('0x18')]);router['post'](_0x1e17('0x8'),controller[_0x1e17('0x19')]);router['put'](_0x1e17('0xa'),auth[_0x1e17('0xb')](),controller[_0x1e17('0x1a')]);router[_0x1e17('0x1b')](_0x1e17('0xa'),auth['isAuthenticated'](),controller[_0x1e17('0x1b')]);module[_0x1e17('0x1c')]=router;
\ No newline at end of file