Built motion from commit (unavailable).|2.5.15
[motion2.git] / server / api / attachment / index.js
index 71e3c11..aba5836 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcd78=['delete','multer','util','connect-timeout','express','Router','../../components/auth/service','get','index','/:id','/:id/download','isAuthenticated','download','clone','diskStorage','root','server/files/attachments/','format','%s-%s','originalname','replace','single','create','put'];(function(_0x465028,_0x4570ac){var _0xb783d4=function(_0x5458c5){while(--_0x5458c5){_0x465028['push'](_0x465028['shift']());}};_0xb783d4(++_0x4570ac);}(_0xcd78,0xa9));var _0x8cd7=function(_0xea1570,_0x2f7856){_0xea1570=_0xea1570-0x0;var _0x579e74=_0xcd78[_0xea1570];return _0x579e74;};'use strict';var multer=require(_0x8cd7('0x0'));var util=require(_0x8cd7('0x1'));var path=require('path');var timeout=require(_0x8cd7('0x2'));var express=require(_0x8cd7('0x3'));var router=express[_0x8cd7('0x4')]();var auth=require(_0x8cd7('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./attachment.controller');router[_0x8cd7('0x6')]('/',auth['isAuthenticated'](),controller[_0x8cd7('0x7')]);router[_0x8cd7('0x6')](_0x8cd7('0x8'),auth['isAuthenticated'](),controller['show']);router['get'](_0x8cd7('0x9'),auth[_0x8cd7('0xa')](),controller[_0x8cd7('0xb')]);router['post']('/:id/clone',auth[_0x8cd7('0xa')](),controller[_0x8cd7('0xc')]);var upload=multer({'storage':multer[_0x8cd7('0xd')]({'destination':function(_0x49caa3,_0x4d4bde,_0x49ac1f){_0x49ac1f(null,path['join'](config[_0x8cd7('0xe')],_0x8cd7('0xf')));},'filename':function(_0x31d3c8,_0x1e1816,_0x2d6488){_0x2d6488(null,util[_0x8cd7('0x10')](_0x8cd7('0x11'),Date['now'](),_0x1e1816[_0x8cd7('0x12')][_0x8cd7('0x13')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router['post']('/',upload[_0x8cd7('0x14')]('file'),controller[_0x8cd7('0x15')]);router[_0x8cd7('0x16')](_0x8cd7('0x8'),auth['isAuthenticated'](),controller['update']);router[_0x8cd7('0x17')](_0x8cd7('0x8'),auth[_0x8cd7('0xa')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x21ab=['util','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./attachment.controller','get','index','show','/:id/download','isAuthenticated','download','post','/:id/clone','clone','diskStorage','join','root','server/files/attachments/','format','now','file','create','put','/:id','update','exports'];(function(_0x2fffb7,_0x3783e){var _0x5ecaf4=function(_0x46d9a2){while(--_0x46d9a2){_0x2fffb7['push'](_0x2fffb7['shift']());}};_0x5ecaf4(++_0x3783e);}(_0x21ab,0x16c));var _0xb21a=function(_0x124728,_0x463dca){_0x124728=_0x124728-0x0;var _0x8eb20f=_0x21ab[_0x124728];return _0x8eb20f;};'use strict';var multer=require('multer');var util=require(_0xb21a('0x0'));var path=require('path');var timeout=require(_0xb21a('0x1'));var express=require(_0xb21a('0x2'));var router=express[_0xb21a('0x3')]();var auth=require('../../components/auth/service');var interaction=require(_0xb21a('0x4'));var config=require(_0xb21a('0x5'));var controller=require(_0xb21a('0x6'));router[_0xb21a('0x7')]('/',auth['isAuthenticated'](),controller[_0xb21a('0x8')]);router[_0xb21a('0x7')]('/:id',auth['isAuthenticated'](),controller[_0xb21a('0x9')]);router['get'](_0xb21a('0xa'),auth[_0xb21a('0xb')](),controller[_0xb21a('0xc')]);router[_0xb21a('0xd')](_0xb21a('0xe'),auth[_0xb21a('0xb')](),controller[_0xb21a('0xf')]);var upload=multer({'storage':multer[_0xb21a('0x10')]({'destination':function(_0x139ce7,_0x3bec53,_0x2da0f8){_0x2da0f8(null,path[_0xb21a('0x11')](config[_0xb21a('0x12')],_0xb21a('0x13')));},'filename':function(_0x486620,_0x50af1d,_0x509c98){_0x509c98(null,util[_0xb21a('0x14')]('%s-%s',Date[_0xb21a('0x15')](),_0x50af1d['originalname']['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0xb21a('0xd')]('/',upload['single'](_0xb21a('0x16')),controller[_0xb21a('0x17')]);router[_0xb21a('0x18')](_0xb21a('0x19'),auth[_0xb21a('0xb')](),controller[_0xb21a('0x1a')]);router['delete'](_0xb21a('0x19'),auth[_0xb21a('0xb')](),controller['destroy']);module[_0xb21a('0x1b')]=router;
\ No newline at end of file