Built motion from commit 14588770.|2.5.38
[motion2.git] / server / api / attachment / index.js
index dc74c75..ace9f2d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1bc6=['../../config/environment','./attachment.controller','get','isAuthenticated','index','/:id','post','clone','diskStorage','server/files/attachments/','originalname','replace','single','file','create','put','delete','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service'];(function(_0x2c8f54,_0x3d5a57){var _0x5cd3e5=function(_0x4b0600){while(--_0x4b0600){_0x2c8f54['push'](_0x2c8f54['shift']());}};_0x5cd3e5(++_0x3d5a57);}(_0x1bc6,0x94));var _0x61bc=function(_0x5a61bf,_0x815b40){_0x5a61bf=_0x5a61bf-0x0;var _0x4974b6=_0x1bc6[_0x5a61bf];return _0x4974b6;};'use strict';var multer=require(_0x61bc('0x0'));var util=require(_0x61bc('0x1'));var path=require(_0x61bc('0x2'));var timeout=require(_0x61bc('0x3'));var express=require(_0x61bc('0x4'));var router=express[_0x61bc('0x5')]();var fs_extra=require(_0x61bc('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0x61bc('0x7'));var config=require(_0x61bc('0x8'));var controller=require(_0x61bc('0x9'));router[_0x61bc('0xa')]('/',auth[_0x61bc('0xb')](),controller[_0x61bc('0xc')]);router[_0x61bc('0xa')](_0x61bc('0xd'),auth[_0x61bc('0xb')](),controller['show']);router[_0x61bc('0xa')]('/:id/download',auth[_0x61bc('0xb')](),controller['download']);router[_0x61bc('0xe')]('/:id/clone',auth[_0x61bc('0xb')](),controller[_0x61bc('0xf')]);var upload=multer({'storage':multer[_0x61bc('0x10')]({'destination':function(_0x5f2543,_0x480314,_0x508f2f){_0x508f2f(null,path['join'](config['root'],_0x61bc('0x11')));},'filename':function(_0x4feac0,_0x3ecf9e,_0xd3759c){_0xd3759c(null,util['format']('%s-%s',Date['now'](),_0x3ecf9e[_0x61bc('0x12')][_0x61bc('0x13')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router['post']('/',upload[_0x61bc('0x14')](_0x61bc('0x15')),controller[_0x61bc('0x16')]);router[_0x61bc('0x17')](_0x61bc('0xd'),auth[_0x61bc('0xb')](),controller['update']);router[_0x61bc('0x18')](_0x61bc('0xd'),auth['isAuthenticated'](),controller['destroy']);module[_0x61bc('0x19')]=router;
\ No newline at end of file
+var _0xb10b=['originalname','replace','single','file','create','put','/:id','update','destroy','exports','multer','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./attachment.controller','get','index','isAuthenticated','show','/:id/download','download','post','/:id/clone','diskStorage','join','server/files/attachments/','format','%s-%s'];(function(_0x3c51ae,_0x1e28ef){var _0x4b01af=function(_0x176b48){while(--_0x176b48){_0x3c51ae['push'](_0x3c51ae['shift']());}};_0x4b01af(++_0x1e28ef);}(_0xb10b,0x12a));var _0xbb10=function(_0x3700fd,_0x5bd346){_0x3700fd=_0x3700fd-0x0;var _0x4ffb6c=_0xb10b[_0x3700fd];return _0x4ffb6c;};'use strict';var multer=require(_0xbb10('0x0'));var util=require('util');var path=require(_0xbb10('0x1'));var timeout=require(_0xbb10('0x2'));var express=require(_0xbb10('0x3'));var router=express['Router']();var fs_extra=require(_0xbb10('0x4'));var auth=require(_0xbb10('0x5'));var interaction=require(_0xbb10('0x6'));var config=require(_0xbb10('0x7'));var controller=require(_0xbb10('0x8'));router[_0xbb10('0x9')]('/',auth['isAuthenticated'](),controller[_0xbb10('0xa')]);router[_0xbb10('0x9')]('/:id',auth[_0xbb10('0xb')](),controller[_0xbb10('0xc')]);router[_0xbb10('0x9')](_0xbb10('0xd'),auth[_0xbb10('0xb')](),controller[_0xbb10('0xe')]);router[_0xbb10('0xf')](_0xbb10('0x10'),auth['isAuthenticated'](),controller['clone']);var upload=multer({'storage':multer[_0xbb10('0x11')]({'destination':function(_0x118a74,_0xce64f3,_0x5e136d){_0x5e136d(null,path[_0xbb10('0x12')](config['root'],_0xbb10('0x13')));},'filename':function(_0x916a32,_0x285009,_0x193a27){_0x193a27(null,util[_0xbb10('0x14')](_0xbb10('0x15'),Date['now'](),_0x285009[_0xbb10('0x16')][_0xbb10('0x17')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0xbb10('0xf')]('/',upload[_0xbb10('0x18')](_0xbb10('0x19')),controller[_0xbb10('0x1a')]);router[_0xbb10('0x1b')](_0xbb10('0x1c'),auth[_0xbb10('0xb')](),controller[_0xbb10('0x1d')]);router['delete'](_0xbb10('0x1c'),auth[_0xbb10('0xb')](),controller[_0xbb10('0x1e')]);module[_0xbb10('0x1f')]=router;
\ No newline at end of file