Built motion from commit 97153652.|2.6.26
[motion2.git] / server / api / attachment / index.js
index 4c6cbfc..6d6c2d5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbbbc=['single','file','create','update','delete','destroy','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./attachment.controller','get','isAuthenticated','index','/:id','show','/:id/download','download','/:id/clone','diskStorage','join','root','%s-%s','now','originalname','post'];(function(_0x29975a,_0x2ca253){var _0x41bcac=function(_0x4023ba){while(--_0x4023ba){_0x29975a['push'](_0x29975a['shift']());}};_0x41bcac(++_0x2ca253);}(_0xbbbc,0xf6));var _0xcbbb=function(_0x235ba6,_0x315773){_0x235ba6=_0x235ba6-0x0;var _0x2aa7c4=_0xbbbc[_0x235ba6];return _0x2aa7c4;};'use strict';var multer=require(_0xcbbb('0x0'));var util=require(_0xcbbb('0x1'));var path=require(_0xcbbb('0x2'));var timeout=require(_0xcbbb('0x3'));var express=require(_0xcbbb('0x4'));var router=express[_0xcbbb('0x5')]();var auth=require(_0xcbbb('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xcbbb('0x7'));var controller=require(_0xcbbb('0x8'));router[_0xcbbb('0x9')]('/',auth[_0xcbbb('0xa')](),controller[_0xcbbb('0xb')]);router['get'](_0xcbbb('0xc'),auth[_0xcbbb('0xa')](),controller[_0xcbbb('0xd')]);router[_0xcbbb('0x9')](_0xcbbb('0xe'),auth[_0xcbbb('0xa')](),controller[_0xcbbb('0xf')]);router['post'](_0xcbbb('0x10'),auth['isAuthenticated'](),controller['clone']);var upload=multer({'storage':multer[_0xcbbb('0x11')]({'destination':function(_0x56c7d0,_0x17822c,_0x5053cd){_0x5053cd(null,path[_0xcbbb('0x12')](config[_0xcbbb('0x13')],'server/files/attachments/'));},'filename':function(_0x631188,_0x53e651,_0x56f81){_0x56f81(null,util['format'](_0xcbbb('0x14'),Date[_0xcbbb('0x15')](),_0x53e651[_0xcbbb('0x16')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0xcbbb('0x17')]('/',upload[_0xcbbb('0x18')](_0xcbbb('0x19')),controller[_0xcbbb('0x1a')]);router['put']('/:id',auth[_0xcbbb('0xa')](),controller[_0xcbbb('0x1b')]);router[_0xcbbb('0x1c')](_0xcbbb('0xc'),auth['isAuthenticated'](),controller[_0xcbbb('0x1d')]);module['exports']=router;
\ No newline at end of file
+var _0xdb28=['path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','/:id','show','/:id/download','download','/:id/clone','clone','join','root','server/files/attachments/','%s-%s','now','originalname','replace','post','single','file','create','put','update','delete','destroy','exports','multer','util'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xdb28,0x106));var _0x8db2=function(_0x3fdc3e,_0x4b9c08){_0x3fdc3e=_0x3fdc3e-0x0;var _0x377696=_0xdb28[_0x3fdc3e];return _0x377696;};'use strict';var multer=require(_0x8db2('0x0'));var util=require(_0x8db2('0x1'));var path=require(_0x8db2('0x2'));var timeout=require(_0x8db2('0x3'));var express=require('express');var router=express[_0x8db2('0x4')]();var fs_extra=require(_0x8db2('0x5'));var auth=require(_0x8db2('0x6'));var interaction=require(_0x8db2('0x7'));var config=require(_0x8db2('0x8'));var controller=require('./attachment.controller');router[_0x8db2('0x9')]('/',auth[_0x8db2('0xa')](),controller['index']);router['get'](_0x8db2('0xb'),auth[_0x8db2('0xa')](),controller[_0x8db2('0xc')]);router[_0x8db2('0x9')](_0x8db2('0xd'),auth[_0x8db2('0xa')](),controller[_0x8db2('0xe')]);router['post'](_0x8db2('0xf'),auth[_0x8db2('0xa')](),controller[_0x8db2('0x10')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x1d9371,_0x150942,_0x576475){_0x576475(null,path[_0x8db2('0x11')](config[_0x8db2('0x12')],_0x8db2('0x13')));},'filename':function(_0x204f49,_0x37d017,_0x559fb1){_0x559fb1(null,util['format'](_0x8db2('0x14'),Date[_0x8db2('0x15')](),_0x37d017[_0x8db2('0x16')][_0x8db2('0x17')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x8db2('0x18')]('/',upload[_0x8db2('0x19')](_0x8db2('0x1a')),controller[_0x8db2('0x1b')]);router[_0x8db2('0x1c')](_0x8db2('0xb'),auth['isAuthenticated'](),controller[_0x8db2('0x1d')]);router[_0x8db2('0x1e')]('/:id',auth[_0x8db2('0xa')](),controller[_0x8db2('0x1f')]);module[_0x8db2('0x20')]=router;
\ No newline at end of file