Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / attachment / index.js
index ebc8bbb..7bc012c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7fce=['multer','util','path','express','fs-extra','../../components/interaction/service','../../config/environment','isAuthenticated','get','/:id','show','post','clone','diskStorage','join','now','originalname','replace','single','create','update','delete'];(function(_0x1c12fa,_0x2cfc4f){var _0x2f4e4b=function(_0x4ccc20){while(--_0x4ccc20){_0x1c12fa['push'](_0x1c12fa['shift']());}};_0x2f4e4b(++_0x2cfc4f);}(_0x7fce,0xdc));var _0xe7fc=function(_0x118389,_0xf610c1){_0x118389=_0x118389-0x0;var _0x412b5f=_0x7fce[_0x118389];return _0x412b5f;};'use strict';var multer=require(_0xe7fc('0x0'));var util=require(_0xe7fc('0x1'));var path=require(_0xe7fc('0x2'));var timeout=require('connect-timeout');var express=require(_0xe7fc('0x3'));var router=express['Router']();var fs_extra=require(_0xe7fc('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0xe7fc('0x5'));var config=require(_0xe7fc('0x6'));var controller=require('./attachment.controller');router['get']('/',auth[_0xe7fc('0x7')](),controller['index']);router[_0xe7fc('0x8')](_0xe7fc('0x9'),auth[_0xe7fc('0x7')](),controller[_0xe7fc('0xa')]);router[_0xe7fc('0x8')]('/:id/download',auth[_0xe7fc('0x7')](),controller['download']);router[_0xe7fc('0xb')]('/:id/clone',auth[_0xe7fc('0x7')](),controller[_0xe7fc('0xc')]);var upload=multer({'storage':multer[_0xe7fc('0xd')]({'destination':function(_0x31c05f,_0x53a26c,_0x278e9a){_0x278e9a(null,path[_0xe7fc('0xe')](config['root'],'server/files/attachments/'));},'filename':function(_0x243600,_0x59da2e,_0x38512a){_0x38512a(null,util['format']('%s-%s',Date[_0xe7fc('0xf')](),_0x59da2e[_0xe7fc('0x10')][_0xe7fc('0x11')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0xe7fc('0xb')]('/',upload[_0xe7fc('0x12')]('file'),controller[_0xe7fc('0x13')]);router['put']('/:id',auth[_0xe7fc('0x7')](),controller[_0xe7fc('0x14')]);router[_0xe7fc('0x15')](_0xe7fc('0x9'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x0b0e=['/:id/clone','clone','diskStorage','join','server/files/attachments/','format','now','originalname','replace','single','create','/:id','delete','destroy','multer','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./attachment.controller','get','isAuthenticated','index','show','/:id/download','post'];(function(_0x38a7ac,_0x45514b){var _0x53061a=function(_0x1d2469){while(--_0x1d2469){_0x38a7ac['push'](_0x38a7ac['shift']());}};_0x53061a(++_0x45514b);}(_0x0b0e,0x187));var _0xe0b0=function(_0x18776a,_0x4fecab){_0x18776a=_0x18776a-0x0;var _0x484e4a=_0x0b0e[_0x18776a];return _0x484e4a;};'use strict';var multer=require(_0xe0b0('0x0'));var util=require('util');var path=require(_0xe0b0('0x1'));var timeout=require('connect-timeout');var express=require(_0xe0b0('0x2'));var router=express[_0xe0b0('0x3')]();var fs_extra=require(_0xe0b0('0x4'));var auth=require(_0xe0b0('0x5'));var interaction=require(_0xe0b0('0x6'));var config=require(_0xe0b0('0x7'));var controller=require(_0xe0b0('0x8'));router[_0xe0b0('0x9')]('/',auth[_0xe0b0('0xa')](),controller[_0xe0b0('0xb')]);router[_0xe0b0('0x9')]('/:id',auth['isAuthenticated'](),controller[_0xe0b0('0xc')]);router[_0xe0b0('0x9')](_0xe0b0('0xd'),auth[_0xe0b0('0xa')](),controller['download']);router[_0xe0b0('0xe')](_0xe0b0('0xf'),auth['isAuthenticated'](),controller[_0xe0b0('0x10')]);var upload=multer({'storage':multer[_0xe0b0('0x11')]({'destination':function(_0x574d96,_0x399320,_0x2cdad2){_0x2cdad2(null,path[_0xe0b0('0x12')](config['root'],_0xe0b0('0x13')));},'filename':function(_0x1c358a,_0x3cc19a,_0x45f914){_0x45f914(null,util[_0xe0b0('0x14')]('%s-%s',Date[_0xe0b0('0x15')](),_0x3cc19a[_0xe0b0('0x16')][_0xe0b0('0x17')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0xe0b0('0xe')]('/',upload[_0xe0b0('0x18')]('file'),controller[_0xe0b0('0x19')]);router['put'](_0xe0b0('0x1a'),auth[_0xe0b0('0xa')](),controller['update']);router[_0xe0b0('0x1b')]('/:id',auth[_0xe0b0('0xa')](),controller[_0xe0b0('0x1c')]);module['exports']=router;
\ No newline at end of file