Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / sound / index.js
index f2729c7..03e2830 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x71b3=['%s-%s%s','basename','extname','now','post','file','create','put','update','delete','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','get','isAuthenticated','index','/:id','show','diskStorage','root','server/files/sounds/original/','originalname'];(function(_0x2af053,_0x4f6d28){var _0x4b4001=function(_0x9200c1){while(--_0x9200c1){_0x2af053['push'](_0x2af053['shift']());}};_0x4b4001(++_0x4f6d28);}(_0x71b3,0x190));var _0x371b=function(_0x5aefe1,_0x353826){_0x5aefe1=_0x5aefe1-0x0;var _0x17a20d=_0x71b3[_0x5aefe1];return _0x17a20d;};'use strict';var multer=require('multer');var util=require(_0x371b('0x0'));var path=require(_0x371b('0x1'));var timeout=require(_0x371b('0x2'));var express=require(_0x371b('0x3'));var router=express[_0x371b('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x371b('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x371b('0x6'));var controller=require('./sound.controller');router[_0x371b('0x7')]('/',auth[_0x371b('0x8')](),controller[_0x371b('0x9')]);router[_0x371b('0x7')](_0x371b('0xa'),auth[_0x371b('0x8')](),controller[_0x371b('0xb')]);router[_0x371b('0x7')]('/:id/download',auth[_0x371b('0x8')](),controller['download']);var upload=multer({'storage':multer[_0x371b('0xc')]({'destination':function(_0x3d04d5,_0x561d18,_0x3105e4){_0x3105e4(null,path['join'](config[_0x371b('0xd')],_0x371b('0xe')));},'filename':function(_0x302842,_0x12dc68,_0x33c2f9){_0x12dc68[_0x371b('0xf')]=_0x12dc68[_0x371b('0xf')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x33c2f9(null,util['format'](_0x371b('0x10'),path[_0x371b('0x11')](_0x12dc68[_0x371b('0xf')],path[_0x371b('0x12')](_0x12dc68[_0x371b('0xf')])),Date[_0x371b('0x13')](),path[_0x371b('0x12')](_0x12dc68[_0x371b('0xf')])));}})});router[_0x371b('0x14')]('/',upload['single'](_0x371b('0x15')),controller[_0x371b('0x16')]);router[_0x371b('0x17')]('/:id',auth[_0x371b('0x8')](),controller[_0x371b('0x18')]);router[_0x371b('0x19')](_0x371b('0xa'),auth['isAuthenticated'](),controller['delete']);module['exports']=router;
\ No newline at end of file
+var _0x4494=['get','isAuthenticated','index','/:id','show','/:id/download','download','root','originalname','replace','format','%s-%s%s','basename','extname','now','post','single','file','create','update','delete','exports','multer','util','express','../../components/auth/service','../../config/environment','./sound.controller'];(function(_0x49adf9,_0x5beeda){var _0x31c29d=function(_0x13c9ac){while(--_0x13c9ac){_0x49adf9['push'](_0x49adf9['shift']());}};_0x31c29d(++_0x5beeda);}(_0x4494,0x14a));var _0x4449=function(_0x29b3b6,_0x1f361d){_0x29b3b6=_0x29b3b6-0x0;var _0x2a2d24=_0x4494[_0x29b3b6];return _0x2a2d24;};'use strict';var multer=require(_0x4449('0x0'));var util=require(_0x4449('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x4449('0x2'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x4449('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0x4449('0x4'));var controller=require(_0x4449('0x5'));router[_0x4449('0x6')]('/',auth[_0x4449('0x7')](),controller[_0x4449('0x8')]);router['get'](_0x4449('0x9'),auth[_0x4449('0x7')](),controller[_0x4449('0xa')]);router['get'](_0x4449('0xb'),auth[_0x4449('0x7')](),controller[_0x4449('0xc')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x1d50b8,_0x3f24c2,_0x191407){_0x191407(null,path['join'](config[_0x4449('0xd')],'server/files/sounds/original/'));},'filename':function(_0x35bcbd,_0xd2ab03,_0x5e6812){_0xd2ab03[_0x4449('0xe')]=_0xd2ab03[_0x4449('0xe')][_0x4449('0xf')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x5e6812(null,util[_0x4449('0x10')](_0x4449('0x11'),path[_0x4449('0x12')](_0xd2ab03['originalname'],path[_0x4449('0x13')](_0xd2ab03['originalname'])),Date[_0x4449('0x14')](),path[_0x4449('0x13')](_0xd2ab03[_0x4449('0xe')])));}})});router[_0x4449('0x15')]('/',upload[_0x4449('0x16')](_0x4449('0x17')),controller[_0x4449('0x18')]);router['put'](_0x4449('0x9'),auth[_0x4449('0x7')](),controller[_0x4449('0x19')]);router[_0x4449('0x1a')]('/:id',auth[_0x4449('0x7')](),controller[_0x4449('0x1a')]);module[_0x4449('0x1b')]=router;
\ No newline at end of file