Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / attachment / index.js
index dbd13b0..7bc012c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf2e3=['download','post','/:id/clone','clone','diskStorage','join','root','format','%s-%s','now','originalname','replace','single','file','create','update','delete','destroy','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./attachment.controller','get','index','/:id','isAuthenticated','show','/:id/download'];(function(_0xd8b71f,_0x5a7bba){var _0x47fcd6=function(_0x23595f){while(--_0x23595f){_0xd8b71f['push'](_0xd8b71f['shift']());}};_0x47fcd6(++_0x5a7bba);}(_0xf2e3,0x9b));var _0x3f2e=function(_0x2080a3,_0x48acfa){_0x2080a3=_0x2080a3-0x0;var _0x8d7d17=_0xf2e3[_0x2080a3];return _0x8d7d17;};'use strict';var multer=require(_0x3f2e('0x0'));var util=require('util');var path=require(_0x3f2e('0x1'));var timeout=require(_0x3f2e('0x2'));var express=require(_0x3f2e('0x3'));var router=express[_0x3f2e('0x4')]();var auth=require(_0x3f2e('0x5'));var interaction=require(_0x3f2e('0x6'));var config=require(_0x3f2e('0x7'));var controller=require(_0x3f2e('0x8'));router[_0x3f2e('0x9')]('/',auth['isAuthenticated'](),controller[_0x3f2e('0xa')]);router[_0x3f2e('0x9')](_0x3f2e('0xb'),auth[_0x3f2e('0xc')](),controller[_0x3f2e('0xd')]);router[_0x3f2e('0x9')](_0x3f2e('0xe'),auth[_0x3f2e('0xc')](),controller[_0x3f2e('0xf')]);router[_0x3f2e('0x10')](_0x3f2e('0x11'),auth[_0x3f2e('0xc')](),controller[_0x3f2e('0x12')]);var upload=multer({'storage':multer[_0x3f2e('0x13')]({'destination':function(_0x1bb1dd,_0x305861,_0x824ee8){_0x824ee8(null,path[_0x3f2e('0x14')](config[_0x3f2e('0x15')],'server/files/attachments/'));},'filename':function(_0x27c697,_0xaa6ef5,_0x5471f9){_0x5471f9(null,util[_0x3f2e('0x16')](_0x3f2e('0x17'),Date[_0x3f2e('0x18')](),_0xaa6ef5[_0x3f2e('0x19')][_0x3f2e('0x1a')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router['post']('/',upload[_0x3f2e('0x1b')](_0x3f2e('0x1c')),controller[_0x3f2e('0x1d')]);router['put'](_0x3f2e('0xb'),auth[_0x3f2e('0xc')](),controller[_0x3f2e('0x1e')]);router[_0x3f2e('0x1f')](_0x3f2e('0xb'),auth[_0x3f2e('0xc')](),controller[_0x3f2e('0x20')]);module[_0x3f2e('0x21')]=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