Built motion from commit 863c3375.|2.6.28
[motion2.git] / server / api / sound / index.js
index d673426..15a3dd4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x27b5=['util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../config/environment','./sound.controller','isAuthenticated','/:id','show','get','/:id/download','download','diskStorage','server/files/sounds/original/','originalname','format','basename','extname','now','file','create','update','delete','exports','multer'];(function(_0x34439f,_0x5f2f7f){var _0x310935=function(_0x4baaf9){while(--_0x4baaf9){_0x34439f['push'](_0x34439f['shift']());}};_0x310935(++_0x5f2f7f);}(_0x27b5,0x6b));var _0x527b=function(_0x5c4e16,_0x113035){_0x5c4e16=_0x5c4e16-0x0;var _0x36044a=_0x27b5[_0x5c4e16];return _0x36044a;};'use strict';var multer=require(_0x527b('0x0'));var util=require(_0x527b('0x1'));var path=require(_0x527b('0x2'));var timeout=require(_0x527b('0x3'));var express=require('express');var router=express[_0x527b('0x4')]();var fs_extra=require(_0x527b('0x5'));var auth=require(_0x527b('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x527b('0x7'));var controller=require(_0x527b('0x8'));router['get']('/',auth[_0x527b('0x9')](),controller['index']);router['get'](_0x527b('0xa'),auth['isAuthenticated'](),controller[_0x527b('0xb')]);router[_0x527b('0xc')](_0x527b('0xd'),auth[_0x527b('0x9')](),controller[_0x527b('0xe')]);var upload=multer({'storage':multer[_0x527b('0xf')]({'destination':function(_0x5d5d0f,_0x91a0f2,_0x401993){_0x401993(null,path['join'](config['root'],_0x527b('0x10')));},'filename':function(_0x3994d2,_0x2711bb,_0x4eecdc){_0x2711bb[_0x527b('0x11')]=_0x2711bb[_0x527b('0x11')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x4eecdc(null,util[_0x527b('0x12')]('%s-%s%s',path[_0x527b('0x13')](_0x2711bb['originalname'],path[_0x527b('0x14')](_0x2711bb['originalname'])),Date[_0x527b('0x15')](),path[_0x527b('0x14')](_0x2711bb[_0x527b('0x11')])));}})});router['post']('/',upload['single'](_0x527b('0x16')),controller[_0x527b('0x17')]);router['put']('/:id',auth[_0x527b('0x9')](),controller[_0x527b('0x18')]);router[_0x527b('0x19')](_0x527b('0xa'),auth[_0x527b('0x9')](),controller['delete']);module[_0x527b('0x1a')]=router;
\ No newline at end of file
+var _0xff78=['now','post','single','create','put','update','delete','multer','util','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','./sound.controller','get','isAuthenticated','index','/:id','show','/:id/download','download','diskStorage','join','originalname','format','basename','extname'];(function(_0x466780,_0x31d0a5){var _0x3351df=function(_0x2b653c){while(--_0x2b653c){_0x466780['push'](_0x466780['shift']());}};_0x3351df(++_0x31d0a5);}(_0xff78,0x93));var _0x8ff7=function(_0x42c118,_0x197006){_0x42c118=_0x42c118-0x0;var _0x112ebd=_0xff78[_0x42c118];return _0x112ebd;};'use strict';var multer=require(_0x8ff7('0x0'));var util=require(_0x8ff7('0x1'));var path=require('path');var timeout=require(_0x8ff7('0x2'));var express=require(_0x8ff7('0x3'));var router=express['Router']();var fs_extra=require(_0x8ff7('0x4'));var auth=require(_0x8ff7('0x5'));var interaction=require(_0x8ff7('0x6'));var config=require('../../config/environment');var controller=require(_0x8ff7('0x7'));router[_0x8ff7('0x8')]('/',auth[_0x8ff7('0x9')](),controller[_0x8ff7('0xa')]);router[_0x8ff7('0x8')](_0x8ff7('0xb'),auth['isAuthenticated'](),controller[_0x8ff7('0xc')]);router['get'](_0x8ff7('0xd'),auth[_0x8ff7('0x9')](),controller[_0x8ff7('0xe')]);var upload=multer({'storage':multer[_0x8ff7('0xf')]({'destination':function(_0x11b7b3,_0x39301f,_0x45b797){_0x45b797(null,path[_0x8ff7('0x10')](config['root'],'server/files/sounds/original/'));},'filename':function(_0x195fff,_0x3be181,_0x268e90){_0x3be181[_0x8ff7('0x11')]=_0x3be181[_0x8ff7('0x11')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x268e90(null,util[_0x8ff7('0x12')]('%s-%s%s',path[_0x8ff7('0x13')](_0x3be181['originalname'],path[_0x8ff7('0x14')](_0x3be181[_0x8ff7('0x11')])),Date[_0x8ff7('0x15')](),path[_0x8ff7('0x14')](_0x3be181[_0x8ff7('0x11')])));}})});router[_0x8ff7('0x16')]('/',upload[_0x8ff7('0x17')]('file'),controller[_0x8ff7('0x18')]);router[_0x8ff7('0x19')](_0x8ff7('0xb'),auth[_0x8ff7('0x9')](),controller[_0x8ff7('0x1a')]);router['delete'](_0x8ff7('0xb'),auth['isAuthenticated'](),controller[_0x8ff7('0x1b')]);module['exports']=router;
\ No newline at end of file