Built motion from commit (unavailable).|2.5.26
[motion2.git] / server / api / plugin / index.js
index 4649fe8..482beff 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x261a=['index','/webhook','webhookGet','/:id','show','/:id/download','download','diskStorage','root','originalname','replace','format','%s-%s%s','basename','extname','now','post','single','file','upload','webhookPost','put','update','delete','path','connect-timeout','express','Router','fs-extra','../../config/environment','get','isAuthenticated'];(function(_0x1be3b3,_0x4335ee){var _0x4f8b2d=function(_0x1d955f){while(--_0x1d955f){_0x1be3b3['push'](_0x1be3b3['shift']());}};_0x4f8b2d(++_0x4335ee);}(_0x261a,0xb8));var _0xa261=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x261a[_0x321bb2];return _0x9c12ed;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xa261('0x0'));var timeout=require(_0xa261('0x1'));var express=require(_0xa261('0x2'));var router=express[_0xa261('0x3')]();var fs_extra=require(_0xa261('0x4'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xa261('0x5'));var controller=require('./plugin.controller');router[_0xa261('0x6')]('/',auth[_0xa261('0x7')](),controller[_0xa261('0x8')]);router[_0xa261('0x6')](_0xa261('0x9'),controller[_0xa261('0xa')]);router['get'](_0xa261('0xb'),auth['isAuthenticated'](),controller[_0xa261('0xc')]);router['get'](_0xa261('0xd'),auth[_0xa261('0x7')](),controller[_0xa261('0xe')]);var upload=multer({'storage':multer[_0xa261('0xf')]({'destination':function(_0x4597ab,_0x5cd530,_0x2acc15){_0x2acc15(null,path['join'](config[_0xa261('0x10')],'server/files/plugins'));},'filename':function(_0xd7a9f8,_0x11b9d9,_0x4d83b6){_0x11b9d9[_0xa261('0x11')]=_0x11b9d9['originalname'][_0xa261('0x12')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x4d83b6(null,util[_0xa261('0x13')](_0xa261('0x14'),path[_0xa261('0x15')](_0x11b9d9['originalname'],path[_0xa261('0x16')](_0x11b9d9[_0xa261('0x11')])),Date[_0xa261('0x17')](),path['extname'](_0x11b9d9[_0xa261('0x11')])));}})});router[_0xa261('0x18')]('/',upload[_0xa261('0x19')](_0xa261('0x1a')),controller[_0xa261('0x1b')]);router[_0xa261('0x18')]('/webhook',controller[_0xa261('0x1c')]);router[_0xa261('0x1d')](_0xa261('0xb'),auth[_0xa261('0x7')](),controller[_0xa261('0x1e')]);router[_0xa261('0x1f')](_0xa261('0xb'),auth[_0xa261('0x7')](),controller[_0xa261('0x1f')]);module['exports']=router;
\ No newline at end of file
+var _0x5a53=['upload','webhookPost','put','update','delete','exports','util','connect-timeout','../../components/auth/service','../../components/interaction/service','./plugin.controller','get','isAuthenticated','/webhook','webhookGet','/:id','show','download','diskStorage','join','root','server/files/plugins','originalname','replace','%s-%s%s','basename','extname','post','single','file'];(function(_0x47b6ff,_0xc8344a){var _0x306227=function(_0x35f0e0){while(--_0x35f0e0){_0x47b6ff['push'](_0x47b6ff['shift']());}};_0x306227(++_0xc8344a);}(_0x5a53,0xf6));var _0x35a5=function(_0x42b684,_0x4bd015){_0x42b684=_0x42b684-0x0;var _0x1b2a6=_0x5a53[_0x42b684];return _0x1b2a6;};'use strict';var multer=require('multer');var util=require(_0x35a5('0x0'));var path=require('path');var timeout=require(_0x35a5('0x1'));var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x35a5('0x2'));var interaction=require(_0x35a5('0x3'));var config=require('../../config/environment');var controller=require(_0x35a5('0x4'));router[_0x35a5('0x5')]('/',auth[_0x35a5('0x6')](),controller['index']);router[_0x35a5('0x5')](_0x35a5('0x7'),controller[_0x35a5('0x8')]);router[_0x35a5('0x5')](_0x35a5('0x9'),auth[_0x35a5('0x6')](),controller[_0x35a5('0xa')]);router['get']('/:id/download',auth['isAuthenticated'](),controller[_0x35a5('0xb')]);var upload=multer({'storage':multer[_0x35a5('0xc')]({'destination':function(_0x349024,_0x1b113c,_0x3db9ef){_0x3db9ef(null,path[_0x35a5('0xd')](config[_0x35a5('0xe')],_0x35a5('0xf')));},'filename':function(_0x9082fc,_0x4f1785,_0xcd4f17){_0x4f1785[_0x35a5('0x10')]=_0x4f1785[_0x35a5('0x10')][_0x35a5('0x11')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0xcd4f17(null,util['format'](_0x35a5('0x12'),path[_0x35a5('0x13')](_0x4f1785[_0x35a5('0x10')],path[_0x35a5('0x14')](_0x4f1785[_0x35a5('0x10')])),Date['now'](),path['extname'](_0x4f1785['originalname'])));}})});router[_0x35a5('0x15')]('/',upload[_0x35a5('0x16')](_0x35a5('0x17')),controller[_0x35a5('0x18')]);router[_0x35a5('0x15')](_0x35a5('0x7'),controller[_0x35a5('0x19')]);router[_0x35a5('0x1a')](_0x35a5('0x9'),auth[_0x35a5('0x6')](),controller[_0x35a5('0x1b')]);router['delete']('/:id',auth[_0x35a5('0x6')](),controller[_0x35a5('0x1c')]);module[_0x35a5('0x1d')]=router;
\ No newline at end of file