Built motion from commit (unavailable).|2.5.13
[motion2.git] / server / api / attachment / index.js
index 71e3c11..4110c56 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 _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