Built motion from commit 10af8726.|2.6.34
[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 _0x606c=['getLogo','/:id/logo_login','getLogoLogin','/:id/gdpr','gdpr','/:id/preferred','diskStorage','root','format','%s%s','logo','extname','originalname','post','single','file','addLogo','join','server/files/images/logos/','logologin','addLogoLogin','preferred','addPreferred','favicon','/:id/favicon','addFavicon','put','isAuthenticated','update','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./setting.controller','get','getDate','/:id','show','/:id/logo'];(function(_0x57c4cd,_0x3dbf83){var _0x255721=function(_0x27296a){while(--_0x27296a){_0x57c4cd['push'](_0x57c4cd['shift']());}};_0x255721(++_0x3dbf83);}(_0x606c,0x159));var _0xc606=function(_0x424a9a,_0x2dd9af){_0x424a9a=_0x424a9a-0x0;var _0xa7831c=_0x606c[_0x424a9a];return _0xa7831c;};'use strict';var multer=require(_0xc606('0x0'));var util=require(_0xc606('0x1'));var path=require(_0xc606('0x2'));var timeout=require('connect-timeout');var express=require(_0xc606('0x3'));var router=express[_0xc606('0x4')]();var fs_extra=require(_0xc606('0x5'));var auth=require(_0xc606('0x6'));var interaction=require(_0xc606('0x7'));var config=require(_0xc606('0x8'));var controller=require(_0xc606('0x9'));router[_0xc606('0xa')]('/',auth['isAuthenticated'](),controller['index']);router[_0xc606('0xa')]('/now',controller[_0xc606('0xb')]);router[_0xc606('0xa')](_0xc606('0xc'),controller[_0xc606('0xd')]);router['get'](_0xc606('0xe'),controller[_0xc606('0xf')]);router[_0xc606('0xa')](_0xc606('0x10'),controller[_0xc606('0x11')]);router[_0xc606('0xa')](_0xc606('0x12'),controller[_0xc606('0x13')]);router[_0xc606('0xa')](_0xc606('0x14'),controller['getPreferred']);router['get']('/:id/favicon',controller['getFavicon']);var upload=multer({'storage':multer[_0xc606('0x15')]({'destination':function(_0x43a96e,_0x3371ae,_0x3d88d3){_0x3d88d3(null,path['join'](config[_0xc606('0x16')],'server/files/images/logos/'));},'filename':function(_0x5b02cf,_0x5de5ff,_0x47f476){_0x47f476(null,util[_0xc606('0x17')](_0xc606('0x18'),_0xc606('0x19'),path[_0xc606('0x1a')](_0x5de5ff[_0xc606('0x1b')])));}})});router[_0xc606('0x1c')]('/:id/logo',upload[_0xc606('0x1d')](_0xc606('0x1e')),controller[_0xc606('0x1f')]);var upload=multer({'storage':multer[_0xc606('0x15')]({'destination':function(_0x1bbef7,_0x2e2215,_0xe0017b){_0xe0017b(null,path[_0xc606('0x20')](config[_0xc606('0x16')],_0xc606('0x21')));},'filename':function(_0x10c2d3,_0x46dc9c,_0x45dbc0){_0x45dbc0(null,util[_0xc606('0x17')](_0xc606('0x18'),_0xc606('0x22'),path['extname'](_0x46dc9c['originalname'])));}})});router[_0xc606('0x1c')](_0xc606('0x10'),upload['single']('file'),controller[_0xc606('0x23')]);var upload=multer({'storage':multer[_0xc606('0x15')]({'destination':function(_0x13a647,_0x556c85,_0x1cdbd3){_0x1cdbd3(null,path[_0xc606('0x20')](config[_0xc606('0x16')],_0xc606('0x21')));},'filename':function(_0x5c94b8,_0x2ace5e,_0x3355c6){_0x3355c6(null,util[_0xc606('0x17')](_0xc606('0x18'),_0xc606('0x24'),path[_0xc606('0x1a')](_0x2ace5e[_0xc606('0x1b')])));}})});router[_0xc606('0x1c')](_0xc606('0x14'),upload['single'](_0xc606('0x1e')),controller[_0xc606('0x25')]);var upload=multer({'storage':multer[_0xc606('0x15')]({'destination':function(_0x800bc4,_0x2616dd,_0x347deb){_0x347deb(null,path['join'](config[_0xc606('0x16')],_0xc606('0x21')));},'filename':function(_0x426f6c,_0x5dd14c,_0x417a4e){_0x417a4e(null,util['format']('%s%s',_0xc606('0x26'),path['extname'](_0x5dd14c[_0xc606('0x1b')])));}})});router['post'](_0xc606('0x27'),upload['single']('file'),controller[_0xc606('0x28')]);router[_0xc606('0x29')](_0xc606('0xc'),auth[_0xc606('0x2a')](),controller[_0xc606('0x2b')]);module[_0xc606('0x2c')]=router;