Built motion from commit c49361c37b5f784889c8087ac6e0e91b7e6b561a. Version 3.0.0...
[motion-next.git] / server / api / attachment / index.js
index 45fcfc7..886543f 100644 (file)
@@ -1 +1 @@
-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
+const a32_0x4b09=['file','isAuthenticated','download','diskStorage','files/attachments/','/:id','path','../../config/environment','now','originalname','exports','single','index','multer','util','clone','update','post','Router','format','./attachment.controller','get','/:id/download','create','put','%s-%s','destroy','express'];(function(_0x61a3be,_0x4b0943){const _0x49db78=function(_0x18aa7c){while(--_0x18aa7c){_0x61a3be['push'](_0x61a3be['shift']());}};_0x49db78(++_0x4b0943);}(a32_0x4b09,0x1e5));const a32_0x49db=function(_0x61a3be,_0x4b0943){_0x61a3be=_0x61a3be-0x0;let _0x49db78=a32_0x4b09[_0x61a3be];return _0x49db78;};const _0x1c810d=a32_0x49db;'use strict';const multer=require(_0x1c810d('0x4')),util=require(_0x1c810d('0x5')),path=require(_0x1c810d('0x19')),express=require(_0x1c810d('0x12')),router=express[_0x1c810d('0x9')](),auth=require('../../components/auth/service'),config=require(_0x1c810d('0x1a')),controller=require(_0x1c810d('0xb'));router['get']('/',auth[_0x1c810d('0x14')](),controller[_0x1c810d('0x3')]),router['get']('/:id',auth[_0x1c810d('0x14')](),controller['show']),router[_0x1c810d('0xc')](_0x1c810d('0xd'),auth[_0x1c810d('0x14')](),controller[_0x1c810d('0x15')]),router[_0x1c810d('0x8')]('/:id/clone',auth[_0x1c810d('0x14')](),controller[_0x1c810d('0x6')]);const upload=multer({'storage':multer[_0x1c810d('0x16')]({'destination':function(_0x18aa7c,_0x29bba6,_0x2a5c64){const _0x5cf699=_0x1c810d;_0x2a5c64(null,path['join'](config['root'],_0x5cf699('0x17')));},'filename':function(_0x143311,_0x5ef44c,_0x309421){const _0x4da7de=_0x1c810d;_0x309421(null,util[_0x4da7de('0xa')](_0x4da7de('0x10'),Date[_0x4da7de('0x1b')](),_0x5ef44c[_0x4da7de('0x0')]['replace'](/[+@&/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x1c810d('0x8')]('/',upload[_0x1c810d('0x2')](_0x1c810d('0x13')),controller[_0x1c810d('0xe')]),router[_0x1c810d('0xf')](_0x1c810d('0x18'),auth[_0x1c810d('0x14')](),controller[_0x1c810d('0x7')]),router['delete']('/:id',auth['isAuthenticated'](),controller[_0x1c810d('0x11')]),module[_0x1c810d('0x1')]=router;
\ No newline at end of file