Built motion from commit ffdca78c.|2.6.24
[motion2.git] / server / api / attachment / index.js
index e8797fd..eb39d27 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5eb1=['isAuthenticated','show','/:id/download','download','post','/:id/clone','clone','diskStorage','join','format','%s-%s','originalname','replace','single','/:id','destroy','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./attachment.controller','get','index'];(function(_0x4bcff5,_0x3f8591){var _0xc97579=function(_0x1b34be){while(--_0x1b34be){_0x4bcff5['push'](_0x4bcff5['shift']());}};_0xc97579(++_0x3f8591);}(_0x5eb1,0x7c));var _0x15eb=function(_0x1d90ca,_0x3bab16){_0x1d90ca=_0x1d90ca-0x0;var _0x28872b=_0x5eb1[_0x1d90ca];return _0x28872b;};'use strict';var multer=require('multer');var util=require(_0x15eb('0x0'));var path=require(_0x15eb('0x1'));var timeout=require(_0x15eb('0x2'));var express=require(_0x15eb('0x3'));var router=express[_0x15eb('0x4')]();var fs_extra=require(_0x15eb('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x15eb('0x6'));var config=require(_0x15eb('0x7'));var controller=require(_0x15eb('0x8'));router[_0x15eb('0x9')]('/',auth['isAuthenticated'](),controller[_0x15eb('0xa')]);router[_0x15eb('0x9')]('/:id',auth[_0x15eb('0xb')](),controller[_0x15eb('0xc')]);router[_0x15eb('0x9')](_0x15eb('0xd'),auth[_0x15eb('0xb')](),controller[_0x15eb('0xe')]);router[_0x15eb('0xf')](_0x15eb('0x10'),auth[_0x15eb('0xb')](),controller[_0x15eb('0x11')]);var upload=multer({'storage':multer[_0x15eb('0x12')]({'destination':function(_0x32a089,_0x4617f5,_0x56c25c){_0x56c25c(null,path[_0x15eb('0x13')](config['root'],'server/files/attachments/'));},'filename':function(_0x498a0c,_0xda1ddf,_0x330436){_0x330436(null,util[_0x15eb('0x14')](_0x15eb('0x15'),Date['now'](),_0xda1ddf[_0x15eb('0x16')][_0x15eb('0x17')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x15eb('0xf')]('/',upload[_0x15eb('0x18')]('file'),controller['create']);router['put']('/:id',auth[_0x15eb('0xb')](),controller['update']);router['delete'](_0x15eb('0x19'),auth['isAuthenticated'](),controller[_0x15eb('0x1a')]);module['exports']=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(_0x44a7fe,_0xf46a9b){var _0x1eab69=function(_0x3ac2ed){while(--_0x3ac2ed){_0x44a7fe['push'](_0x44a7fe['shift']());}};_0x1eab69(++_0xf46a9b);}(_0xb10b,0x12a));var _0xbb10=function(_0x48b6c6,_0xba4073){_0x48b6c6=_0x48b6c6-0x0;var _0x1bcc9a=_0xb10b[_0x48b6c6];return _0x1bcc9a;};'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