Built motion from commit (unavailable).|2.4.19
[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 _0x27e8=['format','extname','originalname','addLogo','%s%s','logologin','file','addLogoLogin','join','post','single','addPreferred','favicon','/:id/favicon','isAuthenticated','update','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./setting.controller','get','/:id','show','/:id/logo','getLogo','/:id/logo_login','getLogoLogin','/:id/gdpr','gdpr','/:id/preferred','getPreferred','getFavicon','diskStorage','root','server/files/images/logos/'];(function(_0x457fac,_0x3e5839){var _0x4019c2=function(_0x426ef3){while(--_0x426ef3){_0x457fac['push'](_0x457fac['shift']());}};_0x4019c2(++_0x3e5839);}(_0x27e8,0x1d4));var _0x827e=function(_0x52ee8e,_0x10dad0){_0x52ee8e=_0x52ee8e-0x0;var _0x44b94f=_0x27e8[_0x52ee8e];return _0x44b94f;};'use strict';var multer=require(_0x827e('0x0'));var util=require('util');var path=require(_0x827e('0x1'));var timeout=require(_0x827e('0x2'));var express=require(_0x827e('0x3'));var router=express[_0x827e('0x4')]();var auth=require(_0x827e('0x5'));var interaction=require(_0x827e('0x6'));var config=require(_0x827e('0x7'));var controller=require(_0x827e('0x8'));router[_0x827e('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0x827e('0x9')](_0x827e('0xa'),controller[_0x827e('0xb')]);router[_0x827e('0x9')](_0x827e('0xc'),controller[_0x827e('0xd')]);router[_0x827e('0x9')](_0x827e('0xe'),controller[_0x827e('0xf')]);router['get'](_0x827e('0x10'),controller[_0x827e('0x11')]);router[_0x827e('0x9')](_0x827e('0x12'),controller[_0x827e('0x13')]);router['get']('/:id/favicon',controller[_0x827e('0x14')]);var upload=multer({'storage':multer[_0x827e('0x15')]({'destination':function(_0xa97cd9,_0x45be5d,_0x304ff0){_0x304ff0(null,path['join'](config[_0x827e('0x16')],_0x827e('0x17')));},'filename':function(_0xc724bd,_0x29a8af,_0x4f98f4){_0x4f98f4(null,util[_0x827e('0x18')]('%s%s','logo',path[_0x827e('0x19')](_0x29a8af[_0x827e('0x1a')])));}})});router['post'](_0x827e('0xc'),upload['single']('file'),controller[_0x827e('0x1b')]);var upload=multer({'storage':multer[_0x827e('0x15')]({'destination':function(_0x397677,_0x4a783f,_0x24297b){_0x24297b(null,path['join'](config[_0x827e('0x16')],_0x827e('0x17')));},'filename':function(_0x4b262d,_0x10c071,_0xd2a0fa){_0xd2a0fa(null,util[_0x827e('0x18')](_0x827e('0x1c'),_0x827e('0x1d'),path[_0x827e('0x19')](_0x10c071[_0x827e('0x1a')])));}})});router['post'](_0x827e('0xe'),upload['single'](_0x827e('0x1e')),controller[_0x827e('0x1f')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0xc67856,_0x72358b,_0x121343){_0x121343(null,path[_0x827e('0x20')](config[_0x827e('0x16')],_0x827e('0x17')));},'filename':function(_0x50955d,_0x141835,_0x3f79d2){_0x3f79d2(null,util['format']('%s%s','preferred',path[_0x827e('0x19')](_0x141835[_0x827e('0x1a')])));}})});router[_0x827e('0x21')](_0x827e('0x12'),upload[_0x827e('0x22')]('file'),controller[_0x827e('0x23')]);var upload=multer({'storage':multer[_0x827e('0x15')]({'destination':function(_0x5ed2a9,_0x4f523e,_0x5b01d7){_0x5b01d7(null,path[_0x827e('0x20')](config[_0x827e('0x16')],_0x827e('0x17')));},'filename':function(_0x4cd235,_0x553cde,_0x39f74b){_0x39f74b(null,util[_0x827e('0x18')](_0x827e('0x1c'),_0x827e('0x24'),path[_0x827e('0x19')](_0x553cde[_0x827e('0x1a')])));}})});router[_0x827e('0x21')](_0x827e('0x25'),upload[_0x827e('0x22')](_0x827e('0x1e')),controller['addFavicon']);router['put'](_0x827e('0xa'),auth[_0x827e('0x26')](),controller[_0x827e('0x27')]);module[_0x827e('0x28')]=router;