Built motion from commit e1760111.|2.6.18
[motion2.git] / server / api / sound / index.js
index 335d39e..1b62e81 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3af1=['basename','extname','now','file','create','put','update','delete','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','./sound.controller','get','index','/:id','isAuthenticated','show','/:id/download','download','diskStorage','join','root','server/files/sounds/original/','originalname','replace','format','%s-%s%s'];(function(_0x2cb82c,_0x2e6e7a){var _0x183a4e=function(_0x3e58eb){while(--_0x3e58eb){_0x2cb82c['push'](_0x2cb82c['shift']());}};_0x183a4e(++_0x2e6e7a);}(_0x3af1,0x69));var _0x13af=function(_0x41a40c,_0x37c8b1){_0x41a40c=_0x41a40c-0x0;var _0x87b056=_0x3af1[_0x41a40c];return _0x87b056;};'use strict';var multer=require('multer');var util=require(_0x13af('0x0'));var path=require(_0x13af('0x1'));var timeout=require(_0x13af('0x2'));var express=require(_0x13af('0x3'));var router=express[_0x13af('0x4')]();var fs_extra=require(_0x13af('0x5'));var auth=require(_0x13af('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x13af('0x7'));router[_0x13af('0x8')]('/',auth['isAuthenticated'](),controller[_0x13af('0x9')]);router['get'](_0x13af('0xa'),auth[_0x13af('0xb')](),controller[_0x13af('0xc')]);router['get'](_0x13af('0xd'),auth[_0x13af('0xb')](),controller[_0x13af('0xe')]);var upload=multer({'storage':multer[_0x13af('0xf')]({'destination':function(_0x454d1c,_0x490548,_0x858976){_0x858976(null,path[_0x13af('0x10')](config[_0x13af('0x11')],_0x13af('0x12')));},'filename':function(_0x546ee7,_0x3d511e,_0x15d503){_0x3d511e[_0x13af('0x13')]=_0x3d511e[_0x13af('0x13')][_0x13af('0x14')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x15d503(null,util[_0x13af('0x15')](_0x13af('0x16'),path[_0x13af('0x17')](_0x3d511e[_0x13af('0x13')],path[_0x13af('0x18')](_0x3d511e[_0x13af('0x13')])),Date[_0x13af('0x19')](),path[_0x13af('0x18')](_0x3d511e[_0x13af('0x13')])));}})});router['post']('/',upload['single'](_0x13af('0x1a')),controller[_0x13af('0x1b')]);router[_0x13af('0x1c')](_0x13af('0xa'),auth[_0x13af('0xb')](),controller[_0x13af('0x1d')]);router[_0x13af('0x1e')](_0x13af('0xa'),auth[_0x13af('0xb')](),controller['delete']);module[_0x13af('0x1f')]=router;
\ No newline at end of file
+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