Built motion from commit (unavailable).|2.5.0
[motion2.git] / server / api / setting / 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 _0x6c2d=['/:id/favicon','diskStorage','join','server/files/images/logos/','format','%s%s','logo','extname','originalname','post','single','file','addLogo','logologin','addLogoLogin','root','preferred','favicon','update','exports','multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','/:id','show','/:id/logo','/:id/logo_login','gdpr','/:id/preferred','getPreferred'];(function(_0x4811a5,_0x48fadc){var _0x1c6a8a=function(_0x2435e2){while(--_0x2435e2){_0x4811a5['push'](_0x4811a5['shift']());}};_0x1c6a8a(++_0x48fadc);}(_0x6c2d,0x1d0));var _0xd6c2=function(_0x5d4f12,_0x11e67c){_0x5d4f12=_0x5d4f12-0x0;var _0x4eb577=_0x6c2d[_0x5d4f12];return _0x4eb577;};'use strict';var multer=require(_0xd6c2('0x0'));var util=require(_0xd6c2('0x1'));var path=require(_0xd6c2('0x2'));var timeout=require(_0xd6c2('0x3'));var express=require(_0xd6c2('0x4'));var router=express['Router']();var auth=require(_0xd6c2('0x5'));var interaction=require(_0xd6c2('0x6'));var config=require(_0xd6c2('0x7'));var controller=require('./setting.controller');router[_0xd6c2('0x8')]('/',auth[_0xd6c2('0x9')](),controller['index']);router[_0xd6c2('0x8')](_0xd6c2('0xa'),controller[_0xd6c2('0xb')]);router[_0xd6c2('0x8')](_0xd6c2('0xc'),controller['getLogo']);router[_0xd6c2('0x8')](_0xd6c2('0xd'),controller['getLogoLogin']);router[_0xd6c2('0x8')]('/:id/gdpr',controller[_0xd6c2('0xe')]);router[_0xd6c2('0x8')](_0xd6c2('0xf'),controller[_0xd6c2('0x10')]);router[_0xd6c2('0x8')](_0xd6c2('0x11'),controller['getFavicon']);var upload=multer({'storage':multer[_0xd6c2('0x12')]({'destination':function(_0x1bd8b8,_0x1c5a03,_0x3bdca7){_0x3bdca7(null,path[_0xd6c2('0x13')](config['root'],_0xd6c2('0x14')));},'filename':function(_0xc9baf7,_0x482fd2,_0x4793ba){_0x4793ba(null,util[_0xd6c2('0x15')](_0xd6c2('0x16'),_0xd6c2('0x17'),path[_0xd6c2('0x18')](_0x482fd2[_0xd6c2('0x19')])));}})});router[_0xd6c2('0x1a')](_0xd6c2('0xc'),upload[_0xd6c2('0x1b')](_0xd6c2('0x1c')),controller[_0xd6c2('0x1d')]);var upload=multer({'storage':multer[_0xd6c2('0x12')]({'destination':function(_0x5e7d6e,_0x5e61ea,_0x58c868){_0x58c868(null,path['join'](config['root'],'server/files/images/logos/'));},'filename':function(_0x322c07,_0x2ed791,_0x2f0395){_0x2f0395(null,util[_0xd6c2('0x15')]('%s%s',_0xd6c2('0x1e'),path['extname'](_0x2ed791[_0xd6c2('0x19')])));}})});router[_0xd6c2('0x1a')](_0xd6c2('0xd'),upload[_0xd6c2('0x1b')](_0xd6c2('0x1c')),controller[_0xd6c2('0x1f')]);var upload=multer({'storage':multer[_0xd6c2('0x12')]({'destination':function(_0xb7cf79,_0x4e7c6b,_0x4cad0c){_0x4cad0c(null,path[_0xd6c2('0x13')](config[_0xd6c2('0x20')],_0xd6c2('0x14')));},'filename':function(_0x16404a,_0x64a2a2,_0x2d8d12){_0x2d8d12(null,util['format']('%s%s',_0xd6c2('0x21'),path[_0xd6c2('0x18')](_0x64a2a2[_0xd6c2('0x19')])));}})});router[_0xd6c2('0x1a')](_0xd6c2('0xf'),upload[_0xd6c2('0x1b')](_0xd6c2('0x1c')),controller['addPreferred']);var upload=multer({'storage':multer[_0xd6c2('0x12')]({'destination':function(_0x33511c,_0x5e774a,_0x3751f3){_0x3751f3(null,path[_0xd6c2('0x13')](config[_0xd6c2('0x20')],_0xd6c2('0x14')));},'filename':function(_0x4ee6e9,_0x5cba4c,_0x129961){_0x129961(null,util['format'](_0xd6c2('0x16'),_0xd6c2('0x22'),path[_0xd6c2('0x18')](_0x5cba4c[_0xd6c2('0x19')])));}})});router[_0xd6c2('0x1a')](_0xd6c2('0x11'),upload[_0xd6c2('0x1b')](_0xd6c2('0x1c')),controller['addFavicon']);router['put']('/:id',auth[_0xd6c2('0x9')](),controller[_0xd6c2('0x23')]);module[_0xd6c2('0x24')]=router;