1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0x1b06=['show','get','/:id/download','download','diskStorage','join','root','originalname','replace','format','%s-%s%s','extname','now','post','single','file','put','update','delete','exports','multer','util','path','connect-timeout','../../components/auth/service','../../config/environment','./sound.controller','isAuthenticated','index','/:id'];(function(_0x1a72f3,_0x217011){var _0x57ef47=function(_0x20123d){while(--_0x20123d){_0x1a72f3['push'](_0x1a72f3['shift']());}};_0x57ef47(++_0x217011);}(_0x1b06,0x15e));var _0x61b0=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x1b06[_0x2dafbe];return _0x58a45a;};'use strict';var multer=require(_0x61b0('0x0'));var util=require(_0x61b0('0x1'));var path=require(_0x61b0('0x2'));var timeout=require(_0x61b0('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x61b0('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x61b0('0x5'));var controller=require(_0x61b0('0x6'));router['get']('/',auth[_0x61b0('0x7')](),controller[_0x61b0('0x8')]);router['get'](_0x61b0('0x9'),auth['isAuthenticated'](),controller[_0x61b0('0xa')]);router[_0x61b0('0xb')](_0x61b0('0xc'),auth[_0x61b0('0x7')](),controller[_0x61b0('0xd')]);var upload=multer({'storage':multer[_0x61b0('0xe')]({'destination':function(_0x2295f7,_0x2097ef,_0x33cedc){_0x33cedc(null,path[_0x61b0('0xf')](config[_0x61b0('0x10')],'server/files/sounds/original/'));},'filename':function(_0x41e8f7,_0x7ea669,_0x18c42d){_0x7ea669[_0x61b0('0x11')]=_0x7ea669[_0x61b0('0x11')][_0x61b0('0x12')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x18c42d(null,util[_0x61b0('0x13')](_0x61b0('0x14'),path['basename'](_0x7ea669[_0x61b0('0x11')],path[_0x61b0('0x15')](_0x7ea669[_0x61b0('0x11')])),Date[_0x61b0('0x16')](),path['extname'](_0x7ea669[_0x61b0('0x11')])));}})});router[_0x61b0('0x17')]('/',upload[_0x61b0('0x18')](_0x61b0('0x19')),controller['create']);router[_0x61b0('0x1a')](_0x61b0('0x9'),auth[_0x61b0('0x7')](),controller[_0x61b0('0x1b')]);router[_0x61b0('0x1c')](_0x61b0('0x9'),auth[_0x61b0('0x7')](),controller[_0x61b0('0x1c')]);module[_0x61b0('0x1d')]=router;