Built motion from commit a9fb64cc6defd8fb3a5cc199221f878e91c0e969. Version 3.0.0...
[motion-next.git] / server / api / attachment / index.js
index 3cddd20..45fcfc7 100644 (file)
@@ -1 +1 @@
-const a32_0x3b64=['replace','single','download','path','show','%s-%s','file','post','get','../../components/auth/service','Router','now','isAuthenticated','../../config/environment','destroy','multer','express','util','/:id','delete','/:id/clone','originalname','diskStorage'];(function(_0x1c803d,_0x3b6457){const _0x26e6a0=function(_0x7460d4){while(--_0x7460d4){_0x1c803d['push'](_0x1c803d['shift']());}};_0x26e6a0(++_0x3b6457);}(a32_0x3b64,0xb0));const a32_0x26e6=function(_0x1c803d,_0x3b6457){_0x1c803d=_0x1c803d-0x0;let _0x26e6a0=a32_0x3b64[_0x1c803d];return _0x26e6a0;};const _0x53bb09=a32_0x26e6;'use strict';const multer=require(_0x53bb09('0x0')),util=require(_0x53bb09('0x2')),path=require(_0x53bb09('0xb')),express=require(_0x53bb09('0x1')),router=express[_0x53bb09('0x12')](),auth=require(_0x53bb09('0x11')),config=require(_0x53bb09('0x15')),controller=require('./attachment.controller');router[_0x53bb09('0x10')]('/',auth[_0x53bb09('0x14')](),controller['index']),router[_0x53bb09('0x10')](_0x53bb09('0x3'),auth[_0x53bb09('0x14')](),controller[_0x53bb09('0xc')]),router[_0x53bb09('0x10')]('/:id/download',auth['isAuthenticated'](),controller[_0x53bb09('0xa')]),router[_0x53bb09('0xf')](_0x53bb09('0x5'),auth['isAuthenticated'](),controller['clone']);const upload=multer({'storage':multer[_0x53bb09('0x7')]({'destination':function(_0x7460d4,_0x3546b2,_0x555367){_0x555367(null,path['join'](config['root'],'files/attachments/'));},'filename':function(_0x5e1958,_0x4449e9,_0x3ba5cb){const _0x13e4e8=_0x53bb09;_0x3ba5cb(null,util['format'](_0x13e4e8('0xd'),Date[_0x13e4e8('0x13')](),_0x4449e9[_0x13e4e8('0x6')][_0x13e4e8('0x8')](/[+@&/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x53bb09('0xf')]('/',upload[_0x53bb09('0x9')](_0x53bb09('0xe')),controller['create']),router['put'](_0x53bb09('0x3'),auth[_0x53bb09('0x14')](),controller['update']),router[_0x53bb09('0x4')](_0x53bb09('0x3'),auth[_0x53bb09('0x14')](),controller[_0x53bb09('0x16')]),module['exports']=router;
\ No newline at end of file
+const a32_0x375a=['util','get','exports','post','Router','originalname','show','../../config/environment','/:id/clone','destroy','./attachment.controller','/:id/download','file','update','single','join','now','isAuthenticated','root','%s-%s','clone','create','path','../../components/auth/service','/:id'];(function(_0x21dddc,_0x375ac8){const _0x18562a=function(_0x225375){while(--_0x225375){_0x21dddc['push'](_0x21dddc['shift']());}};_0x18562a(++_0x375ac8);}(a32_0x375a,0x1a2));const a32_0x1856=function(_0x21dddc,_0x375ac8){_0x21dddc=_0x21dddc-0x0;let _0x18562a=a32_0x375a[_0x21dddc];return _0x18562a;};const _0x4ce836=a32_0x1856;'use strict';const multer=require('multer'),util=require(_0x4ce836('0x7')),path=require(_0x4ce836('0x4')),express=require('express'),router=express[_0x4ce836('0xb')](),auth=require(_0x4ce836('0x5')),config=require(_0x4ce836('0xe')),controller=require(_0x4ce836('0x11'));router[_0x4ce836('0x8')]('/',auth[_0x4ce836('0x18')](),controller['index']),router[_0x4ce836('0x8')](_0x4ce836('0x6'),auth[_0x4ce836('0x18')](),controller[_0x4ce836('0xd')]),router[_0x4ce836('0x8')](_0x4ce836('0x12'),auth[_0x4ce836('0x18')](),controller['download']),router['post'](_0x4ce836('0xf'),auth['isAuthenticated'](),controller[_0x4ce836('0x2')]);const upload=multer({'storage':multer['diskStorage']({'destination':function(_0x225375,_0x5b0cfe,_0x3f5458){const _0x408950=_0x4ce836;_0x3f5458(null,path[_0x408950('0x16')](config[_0x408950('0x0')],'files/attachments/'));},'filename':function(_0x1d7a54,_0x44efc7,_0xbf4bfb){const _0x1b8ff9=_0x4ce836;_0xbf4bfb(null,util['format'](_0x1b8ff9('0x1'),Date[_0x1b8ff9('0x17')](),_0x44efc7[_0x1b8ff9('0xc')]['replace'](/[+@&/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x4ce836('0xa')]('/',upload[_0x4ce836('0x15')](_0x4ce836('0x13')),controller[_0x4ce836('0x3')]),router['put'](_0x4ce836('0x6'),auth[_0x4ce836('0x18')](),controller[_0x4ce836('0x14')]),router['delete'](_0x4ce836('0x6'),auth[_0x4ce836('0x18')](),controller[_0x4ce836('0x10')]),module[_0x4ce836('0x9')]=router;
\ No newline at end of file