X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fapi%2Fsound%2Findex.js;h=c073f94dc6c9dea75dc5ced36ef3dcc812810d49;hb=8cdeeda1196ee7d2ad7723378ea9a4f6c5d1e83a;hp=1b62e81786d3620df7c04d3ac5ca4180703bdd0a;hpb=b8feeab5a72cbb7651a1c603fc767034cd5922cc;p=motion2.git diff --git a/server/api/sound/index.js b/server/api/sound/index.js index 1b62e81..c073f94 100644 --- a/server/api/sound/index.js +++ b/server/api/sound/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb2ed=['Router','fs-extra','../../components/auth/service','../../config/environment','./sound.controller','isAuthenticated','index','get','/:id','show','/:id/download','download','diskStorage','join','root','originalname','replace','format','basename','now','post','single','file','create','update','delete','multer','util','path'];(function(_0x3ab51d,_0x2fa01d){var _0x29a04e=function(_0x7807b0){while(--_0x7807b0){_0x3ab51d['push'](_0x3ab51d['shift']());}};_0x29a04e(++_0x2fa01d);}(_0xb2ed,0x102));var _0xdb2e=function(_0x19e928,_0x26a0e4){_0x19e928=_0x19e928-0x0;var _0x4e941f=_0xb2ed[_0x19e928];return _0x4e941f;};'use strict';var multer=require(_0xdb2e('0x0'));var util=require(_0xdb2e('0x1'));var path=require(_0xdb2e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0xdb2e('0x3')]();var fs_extra=require(_0xdb2e('0x4'));var auth=require(_0xdb2e('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xdb2e('0x6'));var controller=require(_0xdb2e('0x7'));router['get']('/',auth[_0xdb2e('0x8')](),controller[_0xdb2e('0x9')]);router[_0xdb2e('0xa')](_0xdb2e('0xb'),auth[_0xdb2e('0x8')](),controller[_0xdb2e('0xc')]);router[_0xdb2e('0xa')](_0xdb2e('0xd'),auth[_0xdb2e('0x8')](),controller[_0xdb2e('0xe')]);var upload=multer({'storage':multer[_0xdb2e('0xf')]({'destination':function(_0x31f3ea,_0x2a8041,_0xb458c2){_0xb458c2(null,path[_0xdb2e('0x10')](config[_0xdb2e('0x11')],'server/files/sounds/original/'));},'filename':function(_0x2fac94,_0x452da1,_0x5a423d){_0x452da1[_0xdb2e('0x12')]=_0x452da1[_0xdb2e('0x12')][_0xdb2e('0x13')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x5a423d(null,util[_0xdb2e('0x14')]('%s-%s%s',path[_0xdb2e('0x15')](_0x452da1[_0xdb2e('0x12')],path['extname'](_0x452da1[_0xdb2e('0x12')])),Date[_0xdb2e('0x16')](),path['extname'](_0x452da1[_0xdb2e('0x12')])));}})});router[_0xdb2e('0x17')]('/',upload[_0xdb2e('0x18')](_0xdb2e('0x19')),controller[_0xdb2e('0x1a')]);router['put'](_0xdb2e('0xb'),auth['isAuthenticated'](),controller[_0xdb2e('0x1b')]);router[_0xdb2e('0x1c')]('/:id',auth[_0xdb2e('0x8')](),controller[_0xdb2e('0x1c')]);module['exports']=router; \ No newline at end of file +var _0xcc2d=['connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./sound.controller','isAuthenticated','index','/:id','show','get','/:id/download','download','diskStorage','root','server/files/sounds/original/','originalname','replace','format','%s-%s%s','basename','extname','now','post','single','file','put','update','delete','exports','multer','util','path'];(function(_0x3851e3,_0x765cc9){var _0x47804d=function(_0x3ddf2e){while(--_0x3ddf2e){_0x3851e3['push'](_0x3851e3['shift']());}};_0x47804d(++_0x765cc9);}(_0xcc2d,0xa7));var _0xdcc2=function(_0x5c350f,_0x534f2a){_0x5c350f=_0x5c350f-0x0;var _0x42369d=_0xcc2d[_0x5c350f];return _0x42369d;};'use strict';var multer=require(_0xdcc2('0x0'));var util=require(_0xdcc2('0x1'));var path=require(_0xdcc2('0x2'));var timeout=require(_0xdcc2('0x3'));var express=require(_0xdcc2('0x4'));var router=express[_0xdcc2('0x5')]();var fs_extra=require(_0xdcc2('0x6'));var auth=require(_0xdcc2('0x7'));var interaction=require(_0xdcc2('0x8'));var config=require('../../config/environment');var controller=require(_0xdcc2('0x9'));router['get']('/',auth[_0xdcc2('0xa')](),controller[_0xdcc2('0xb')]);router['get'](_0xdcc2('0xc'),auth[_0xdcc2('0xa')](),controller[_0xdcc2('0xd')]);router[_0xdcc2('0xe')](_0xdcc2('0xf'),auth[_0xdcc2('0xa')](),controller[_0xdcc2('0x10')]);var upload=multer({'storage':multer[_0xdcc2('0x11')]({'destination':function(_0x2cf2b3,_0x3a0b00,_0xddae74){_0xddae74(null,path['join'](config[_0xdcc2('0x12')],_0xdcc2('0x13')));},'filename':function(_0x7c8542,_0x13ceed,_0x4bd916){_0x13ceed[_0xdcc2('0x14')]=_0x13ceed[_0xdcc2('0x14')][_0xdcc2('0x15')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x4bd916(null,util[_0xdcc2('0x16')](_0xdcc2('0x17'),path[_0xdcc2('0x18')](_0x13ceed[_0xdcc2('0x14')],path[_0xdcc2('0x19')](_0x13ceed['originalname'])),Date[_0xdcc2('0x1a')](),path[_0xdcc2('0x19')](_0x13ceed[_0xdcc2('0x14')])));}})});router[_0xdcc2('0x1b')]('/',upload[_0xdcc2('0x1c')](_0xdcc2('0x1d')),controller['create']);router[_0xdcc2('0x1e')]('/:id',auth[_0xdcc2('0xa')](),controller[_0xdcc2('0x1f')]);router[_0xdcc2('0x20')]('/:id',auth[_0xdcc2('0xa')](),controller[_0xdcc2('0x20')]);module[_0xdcc2('0x21')]=router; \ No newline at end of file