Built motion from commit (unavailable).|2.4.18
[motion2.git] / server / api / sound / index.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xc26f=['%s-%s%s','basename','extname','post','single','file','create','put','/:id','update','exports','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./sound.controller','get','isAuthenticated','index','show','/:id/download','download','join','root','server/files/sounds/original/','originalname','replace'];(function(_0x271537,_0x8b7b3b){var _0x19dc22=function(_0x459bbf){while(--_0x459bbf){_0x271537['push'](_0x271537['shift']());}};_0x19dc22(++_0x8b7b3b);}(_0xc26f,0x87));var _0xfc26=function(_0x4b7895,_0x3c4f5d){_0x4b7895=_0x4b7895-0x0;var _0x264180=_0xc26f[_0x4b7895];return _0x264180;};'use strict';var multer=require(_0xfc26('0x0'));var util=require(_0xfc26('0x1'));var path=require('path');var timeout=require(_0xfc26('0x2'));var express=require(_0xfc26('0x3'));var router=express[_0xfc26('0x4')]();var auth=require(_0xfc26('0x5'));var interaction=require(_0xfc26('0x6'));var config=require(_0xfc26('0x7'));var controller=require(_0xfc26('0x8'));router[_0xfc26('0x9')]('/',auth[_0xfc26('0xa')](),controller[_0xfc26('0xb')]);router[_0xfc26('0x9')]('/:id',auth[_0xfc26('0xa')](),controller[_0xfc26('0xc')]);router[_0xfc26('0x9')](_0xfc26('0xd'),auth[_0xfc26('0xa')](),controller[_0xfc26('0xe')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x5e557e,_0x28c12b,_0x3a5698){_0x3a5698(null,path[_0xfc26('0xf')](config[_0xfc26('0x10')],_0xfc26('0x11')));},'filename':function(_0x11b65e,_0x419a55,_0x580319){_0x419a55['originalname']=_0x419a55[_0xfc26('0x12')][_0xfc26('0x13')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x580319(null,util['format'](_0xfc26('0x14'),path[_0xfc26('0x15')](_0x419a55[_0xfc26('0x12')],path[_0xfc26('0x16')](_0x419a55[_0xfc26('0x12')])),Date['now'](),path[_0xfc26('0x16')](_0x419a55[_0xfc26('0x12')])));}})});router[_0xfc26('0x17')]('/',upload[_0xfc26('0x18')](_0xfc26('0x19')),controller[_0xfc26('0x1a')]);router[_0xfc26('0x1b')](_0xfc26('0x1c'),auth['isAuthenticated'](),controller[_0xfc26('0x1d')]);router['delete']('/:id',auth[_0xfc26('0xa')](),controller['delete']);module[_0xfc26('0x1e')]=router;