Built motion from commit (unavailable).|2.5.13
[motion2.git] / server / api / attachment / index.js
index 669364b..4110c56 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6aa4=['put','update','delete','destroy','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./attachment.controller','get','isAuthenticated','index','/:id','/:id/download','download','post','/:id/clone','clone','diskStorage','join','root','format','replace','file','create'];(function(_0x5c6be5,_0x3ff1d5){var _0x151348=function(_0x3df6c6){while(--_0x3df6c6){_0x5c6be5['push'](_0x5c6be5['shift']());}};_0x151348(++_0x3ff1d5);}(_0x6aa4,0xb2));var _0x46aa=function(_0x2a96ff,_0x558504){_0x2a96ff=_0x2a96ff-0x0;var _0x142175=_0x6aa4[_0x2a96ff];return _0x142175;};'use strict';var multer=require(_0x46aa('0x0'));var util=require(_0x46aa('0x1'));var path=require(_0x46aa('0x2'));var timeout=require('connect-timeout');var express=require(_0x46aa('0x3'));var router=express[_0x46aa('0x4')]();var auth=require(_0x46aa('0x5'));var interaction=require(_0x46aa('0x6'));var config=require(_0x46aa('0x7'));var controller=require(_0x46aa('0x8'));router[_0x46aa('0x9')]('/',auth[_0x46aa('0xa')](),controller[_0x46aa('0xb')]);router[_0x46aa('0x9')](_0x46aa('0xc'),auth[_0x46aa('0xa')](),controller['show']);router[_0x46aa('0x9')](_0x46aa('0xd'),auth[_0x46aa('0xa')](),controller[_0x46aa('0xe')]);router[_0x46aa('0xf')](_0x46aa('0x10'),auth['isAuthenticated'](),controller[_0x46aa('0x11')]);var upload=multer({'storage':multer[_0x46aa('0x12')]({'destination':function(_0x5a82d5,_0x13db49,_0x474c2e){_0x474c2e(null,path[_0x46aa('0x13')](config[_0x46aa('0x14')],'server/files/attachments/'));},'filename':function(_0x31a0e3,_0x5f1237,_0x6a73c1){_0x6a73c1(null,util[_0x46aa('0x15')]('%s-%s',Date['now'](),_0x5f1237['originalname'][_0x46aa('0x16')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x46aa('0xf')]('/',upload['single'](_0x46aa('0x17')),controller[_0x46aa('0x18')]);router[_0x46aa('0x19')](_0x46aa('0xc'),auth[_0x46aa('0xa')](),controller[_0x46aa('0x1a')]);router[_0x46aa('0x1b')](_0x46aa('0xc'),auth['isAuthenticated'](),controller[_0x46aa('0x1c')]);module['exports']=router;
\ No newline at end of file
+var _0xe9f2=['multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','/:id/download','download','/:id/clone','clone','diskStorage','join','root','format','%s-%s','now','originalname','replace','file','create','put','update','delete','destroy','exports'];(function(_0x19331b,_0x175110){var _0x54221b=function(_0x2657b3){while(--_0x2657b3){_0x19331b['push'](_0x19331b['shift']());}};_0x54221b(++_0x175110);}(_0xe9f2,0xba));var _0x2e9f=function(_0x289c19,_0x5efacc){_0x289c19=_0x289c19-0x0;var _0x292bbe=_0xe9f2[_0x289c19];return _0x292bbe;};'use strict';var multer=require(_0x2e9f('0x0'));var util=require(_0x2e9f('0x1'));var path=require(_0x2e9f('0x2'));var timeout=require(_0x2e9f('0x3'));var express=require('express');var router=express[_0x2e9f('0x4')]();var auth=require(_0x2e9f('0x5'));var interaction=require(_0x2e9f('0x6'));var config=require(_0x2e9f('0x7'));var controller=require('./attachment.controller');router[_0x2e9f('0x8')]('/',auth[_0x2e9f('0x9')](),controller[_0x2e9f('0xa')]);router['get'](_0x2e9f('0xb'),auth[_0x2e9f('0x9')](),controller['show']);router['get'](_0x2e9f('0xc'),auth[_0x2e9f('0x9')](),controller[_0x2e9f('0xd')]);router['post'](_0x2e9f('0xe'),auth['isAuthenticated'](),controller[_0x2e9f('0xf')]);var upload=multer({'storage':multer[_0x2e9f('0x10')]({'destination':function(_0x54ace4,_0x2985fd,_0x5ea82f){_0x5ea82f(null,path[_0x2e9f('0x11')](config[_0x2e9f('0x12')],'server/files/attachments/'));},'filename':function(_0x37da6c,_0x277ecc,_0x2493d9){_0x2493d9(null,util[_0x2e9f('0x13')](_0x2e9f('0x14'),Date[_0x2e9f('0x15')](),_0x277ecc[_0x2e9f('0x16')][_0x2e9f('0x17')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router['post']('/',upload['single'](_0x2e9f('0x18')),controller[_0x2e9f('0x19')]);router[_0x2e9f('0x1a')](_0x2e9f('0xb'),auth[_0x2e9f('0x9')](),controller[_0x2e9f('0x1b')]);router[_0x2e9f('0x1c')]('/:id',auth['isAuthenticated'](),controller[_0x2e9f('0x1d')]);module[_0x2e9f('0x1e')]=router;
\ No newline at end of file