Built motion from commit (unavailable).|2.5.1
[motion2.git] / server / api / attachment / index.js
index 5cf2b10..f4eb86f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb4c3=['file','create','put','/:id','update','delete','destroy','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','isAuthenticated','show','/:id/download','download','post','/:id/clone','diskStorage','join','server/files/attachments/','format','%s-%s','replace','single'];(function(_0x8b69e9,_0x1407f9){var _0x485d2d=function(_0x3b9ce1){while(--_0x3b9ce1){_0x8b69e9['push'](_0x8b69e9['shift']());}};_0x485d2d(++_0x1407f9);}(_0xb4c3,0x115));var _0x3b4c=function(_0xba33b6,_0x53e429){_0xba33b6=_0xba33b6-0x0;var _0x7ce659=_0xb4c3[_0xba33b6];return _0x7ce659;};'use strict';var multer=require(_0x3b4c('0x0'));var util=require('util');var path=require(_0x3b4c('0x1'));var timeout=require(_0x3b4c('0x2'));var express=require(_0x3b4c('0x3'));var router=express[_0x3b4c('0x4')]();var auth=require(_0x3b4c('0x5'));var interaction=require(_0x3b4c('0x6'));var config=require(_0x3b4c('0x7'));var controller=require('./attachment.controller');router[_0x3b4c('0x8')]('/',auth['isAuthenticated'](),controller[_0x3b4c('0x9')]);router[_0x3b4c('0x8')]('/:id',auth[_0x3b4c('0xa')](),controller[_0x3b4c('0xb')]);router[_0x3b4c('0x8')](_0x3b4c('0xc'),auth[_0x3b4c('0xa')](),controller[_0x3b4c('0xd')]);router[_0x3b4c('0xe')](_0x3b4c('0xf'),auth['isAuthenticated'](),controller['clone']);var upload=multer({'storage':multer[_0x3b4c('0x10')]({'destination':function(_0x3288eb,_0x43ac72,_0x14cb65){_0x14cb65(null,path[_0x3b4c('0x11')](config['root'],_0x3b4c('0x12')));},'filename':function(_0x153500,_0x2e1f99,_0x2769f6){_0x2769f6(null,util[_0x3b4c('0x13')](_0x3b4c('0x14'),Date['now'](),_0x2e1f99['originalname'][_0x3b4c('0x15')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x3b4c('0xe')]('/',upload[_0x3b4c('0x16')](_0x3b4c('0x17')),controller[_0x3b4c('0x18')]);router[_0x3b4c('0x19')](_0x3b4c('0x1a'),auth[_0x3b4c('0xa')](),controller[_0x3b4c('0x1b')]);router[_0x3b4c('0x1c')](_0x3b4c('0x1a'),auth['isAuthenticated'](),controller[_0x3b4c('0x1d')]);module['exports']=router;
\ No newline at end of file
+var _0xbc87=['create','put','delete','destroy','exports','multer','connect-timeout','express','Router','../../config/environment','./attachment.controller','get','isAuthenticated','index','/:id','show','/:id/download','download','post','/:id/clone','clone','join','root','server/files/attachments/','format','%s-%s','originalname','single','file'];(function(_0x4103af,_0x3eca37){var _0x56f720=function(_0x24c102){while(--_0x24c102){_0x4103af['push'](_0x4103af['shift']());}};_0x56f720(++_0x3eca37);}(_0xbc87,0x144));var _0x7bc8=function(_0x1c489c,_0x5b1c09){_0x1c489c=_0x1c489c-0x0;var _0xe29147=_0xbc87[_0x1c489c];return _0xe29147;};'use strict';var multer=require(_0x7bc8('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x7bc8('0x1'));var express=require(_0x7bc8('0x2'));var router=express[_0x7bc8('0x3')]();var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x7bc8('0x4'));var controller=require(_0x7bc8('0x5'));router[_0x7bc8('0x6')]('/',auth[_0x7bc8('0x7')](),controller[_0x7bc8('0x8')]);router[_0x7bc8('0x6')](_0x7bc8('0x9'),auth[_0x7bc8('0x7')](),controller[_0x7bc8('0xa')]);router[_0x7bc8('0x6')](_0x7bc8('0xb'),auth[_0x7bc8('0x7')](),controller[_0x7bc8('0xc')]);router[_0x7bc8('0xd')](_0x7bc8('0xe'),auth[_0x7bc8('0x7')](),controller[_0x7bc8('0xf')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0xd1616a,_0x47a082,_0xc357a2){_0xc357a2(null,path[_0x7bc8('0x10')](config[_0x7bc8('0x11')],_0x7bc8('0x12')));},'filename':function(_0x39d4f8,_0x41a2be,_0x4cd0ff){_0x4cd0ff(null,util[_0x7bc8('0x13')](_0x7bc8('0x14'),Date['now'](),_0x41a2be[_0x7bc8('0x15')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x7bc8('0xd')]('/',upload[_0x7bc8('0x16')](_0x7bc8('0x17')),controller[_0x7bc8('0x18')]);router[_0x7bc8('0x19')]('/:id',auth[_0x7bc8('0x7')](),controller['update']);router[_0x7bc8('0x1a')]('/:id',auth[_0x7bc8('0x7')](),controller[_0x7bc8('0x1b')]);module[_0x7bc8('0x1c')]=router;
\ No newline at end of file