Built motion from commit (unavailable).|2.6.0
[motion2.git] / server / api / attachment / index.js
index ce19afb..93e03e6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6b24=['format','%s-%s','now','originalname','replace','single','file','put','update','delete','destroy','exports','util','path','connect-timeout','express','../../components/interaction/service','./attachment.controller','isAuthenticated','/:id','show','get','/:id/download','download','post','/:id/clone','diskStorage','join','root','server/files/attachments/'];(function(_0x48932e,_0x5d2931){var _0x1d9b3d=function(_0x1c968d){while(--_0x1c968d){_0x48932e['push'](_0x48932e['shift']());}};_0x1d9b3d(++_0x5d2931);}(_0x6b24,0x1ce));var _0x46b2=function(_0x2704be,_0x2555d4){_0x2704be=_0x2704be-0x0;var _0x21d7b5=_0x6b24[_0x2704be];return _0x21d7b5;};'use strict';var multer=require('multer');var util=require(_0x46b2('0x0'));var path=require(_0x46b2('0x1'));var timeout=require(_0x46b2('0x2'));var express=require(_0x46b2('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x46b2('0x4'));var config=require('../../config/environment');var controller=require(_0x46b2('0x5'));router['get']('/',auth[_0x46b2('0x6')](),controller['index']);router['get'](_0x46b2('0x7'),auth[_0x46b2('0x6')](),controller[_0x46b2('0x8')]);router[_0x46b2('0x9')](_0x46b2('0xa'),auth[_0x46b2('0x6')](),controller[_0x46b2('0xb')]);router[_0x46b2('0xc')](_0x46b2('0xd'),auth['isAuthenticated'](),controller['clone']);var upload=multer({'storage':multer[_0x46b2('0xe')]({'destination':function(_0x38e08d,_0xb546cf,_0x5bb2c3){_0x5bb2c3(null,path[_0x46b2('0xf')](config[_0x46b2('0x10')],_0x46b2('0x11')));},'filename':function(_0x5343fc,_0x468ae9,_0x886e41){_0x886e41(null,util[_0x46b2('0x12')](_0x46b2('0x13'),Date[_0x46b2('0x14')](),_0x468ae9[_0x46b2('0x15')][_0x46b2('0x16')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x46b2('0xc')]('/',upload[_0x46b2('0x17')](_0x46b2('0x18')),controller['create']);router[_0x46b2('0x19')](_0x46b2('0x7'),auth['isAuthenticated'](),controller[_0x46b2('0x1a')]);router[_0x46b2('0x1b')](_0x46b2('0x7'),auth[_0x46b2('0x6')](),controller[_0x46b2('0x1c')]);module[_0x46b2('0x1d')]=router;
\ No newline at end of file
+var _0xa149=['get','index','/:id','isAuthenticated','show','post','/:id/clone','clone','diskStorage','server/files/attachments/','%s-%s','replace','single','file','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./attachment.controller'];(function(_0x5505b8,_0x5876ea){var _0x5c57ca=function(_0x251c3c){while(--_0x251c3c){_0x5505b8['push'](_0x5505b8['shift']());}};_0x5c57ca(++_0x5876ea);}(_0xa149,0x18c));var _0x9a14=function(_0x255c1f,_0x572d75){_0x255c1f=_0x255c1f-0x0;var _0x44b30b=_0xa149[_0x255c1f];return _0x44b30b;};'use strict';var multer=require(_0x9a14('0x0'));var util=require(_0x9a14('0x1'));var path=require(_0x9a14('0x2'));var timeout=require(_0x9a14('0x3'));var express=require(_0x9a14('0x4'));var router=express[_0x9a14('0x5')]();var fs_extra=require(_0x9a14('0x6'));var auth=require(_0x9a14('0x7'));var interaction=require(_0x9a14('0x8'));var config=require('../../config/environment');var controller=require(_0x9a14('0x9'));router[_0x9a14('0xa')]('/',auth['isAuthenticated'](),controller[_0x9a14('0xb')]);router[_0x9a14('0xa')](_0x9a14('0xc'),auth[_0x9a14('0xd')](),controller[_0x9a14('0xe')]);router[_0x9a14('0xa')]('/:id/download',auth[_0x9a14('0xd')](),controller['download']);router[_0x9a14('0xf')](_0x9a14('0x10'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x11')]);var upload=multer({'storage':multer[_0x9a14('0x12')]({'destination':function(_0x1444a5,_0x50c6d4,_0x5d4ed8){_0x5d4ed8(null,path['join'](config['root'],_0x9a14('0x13')));},'filename':function(_0x34c392,_0x4f358b,_0x231f1a){_0x231f1a(null,util['format'](_0x9a14('0x14'),Date['now'](),_0x4f358b['originalname'][_0x9a14('0x15')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x9a14('0xf')]('/',upload[_0x9a14('0x16')](_0x9a14('0x17')),controller['create']);router[_0x9a14('0x18')](_0x9a14('0xc'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x19')]);router[_0x9a14('0x1a')](_0x9a14('0xc'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x1b')]);module[_0x9a14('0x1c')]=router;
\ No newline at end of file