Built motion from commit 8356fca3.|2.6.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 _0xdb4f=['%s%s','logologin','addLogoLogin','single','favicon','addFavicon','put','update','exports','multer','util','connect-timeout','express','Router','../../components/auth/service','../../config/environment','get','isAuthenticated','index','/now','getDate','/:id','/:id/logo','getLogo','/:id/logo_login','getLogoLogin','/:id/gdpr','gdpr','/:id/preferred','getPreferred','/:id/favicon','diskStorage','join','root','server/files/images/logos/','format','logo','extname','originalname','post','file','addLogo'];(function(_0x55032d,_0x18d06c){var _0xa349da=function(_0x5c9e90){while(--_0x5c9e90){_0x55032d['push'](_0x55032d['shift']());}};_0xa349da(++_0x18d06c);}(_0xdb4f,0x159));var _0xfdb4=function(_0x2f7c40,_0xb36203){_0x2f7c40=_0x2f7c40-0x0;var _0x57a4a5=_0xdb4f[_0x2f7c40];return _0x57a4a5;};'use strict';var multer=require(_0xfdb4('0x0'));var util=require(_0xfdb4('0x1'));var path=require('path');var timeout=require(_0xfdb4('0x2'));var express=require(_0xfdb4('0x3'));var router=express[_0xfdb4('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xfdb4('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xfdb4('0x6'));var controller=require('./setting.controller');router[_0xfdb4('0x7')]('/',auth[_0xfdb4('0x8')](),controller[_0xfdb4('0x9')]);router['get'](_0xfdb4('0xa'),controller[_0xfdb4('0xb')]);router[_0xfdb4('0x7')](_0xfdb4('0xc'),controller['show']);router[_0xfdb4('0x7')](_0xfdb4('0xd'),controller[_0xfdb4('0xe')]);router[_0xfdb4('0x7')](_0xfdb4('0xf'),controller[_0xfdb4('0x10')]);router[_0xfdb4('0x7')](_0xfdb4('0x11'),controller[_0xfdb4('0x12')]);router[_0xfdb4('0x7')](_0xfdb4('0x13'),controller[_0xfdb4('0x14')]);router['get'](_0xfdb4('0x15'),controller['getFavicon']);var upload=multer({'storage':multer[_0xfdb4('0x16')]({'destination':function(_0x1bcfd3,_0x23080c,_0xc2efc5){_0xc2efc5(null,path[_0xfdb4('0x17')](config[_0xfdb4('0x18')],_0xfdb4('0x19')));},'filename':function(_0x2d0c1d,_0x486599,_0xd48158){_0xd48158(null,util[_0xfdb4('0x1a')]('%s%s',_0xfdb4('0x1b'),path[_0xfdb4('0x1c')](_0x486599[_0xfdb4('0x1d')])));}})});router[_0xfdb4('0x1e')](_0xfdb4('0xd'),upload['single'](_0xfdb4('0x1f')),controller[_0xfdb4('0x20')]);var upload=multer({'storage':multer[_0xfdb4('0x16')]({'destination':function(_0x26094f,_0x324f38,_0x4669ac){_0x4669ac(null,path['join'](config[_0xfdb4('0x18')],_0xfdb4('0x19')));},'filename':function(_0x556e3c,_0x4dd700,_0x343203){_0x343203(null,util[_0xfdb4('0x1a')](_0xfdb4('0x21'),_0xfdb4('0x22'),path[_0xfdb4('0x1c')](_0x4dd700[_0xfdb4('0x1d')])));}})});router[_0xfdb4('0x1e')](_0xfdb4('0xf'),upload['single'](_0xfdb4('0x1f')),controller[_0xfdb4('0x23')]);var upload=multer({'storage':multer[_0xfdb4('0x16')]({'destination':function(_0x15980a,_0x102114,_0x1f625a){_0x1f625a(null,path[_0xfdb4('0x17')](config[_0xfdb4('0x18')],_0xfdb4('0x19')));},'filename':function(_0x185166,_0x512047,_0x2c63be){_0x2c63be(null,util['format']('%s%s','preferred',path[_0xfdb4('0x1c')](_0x512047[_0xfdb4('0x1d')])));}})});router[_0xfdb4('0x1e')](_0xfdb4('0x13'),upload[_0xfdb4('0x24')]('file'),controller['addPreferred']);var upload=multer({'storage':multer[_0xfdb4('0x16')]({'destination':function(_0x3d1f1e,_0x4bd31a,_0x2a1a46){_0x2a1a46(null,path[_0xfdb4('0x17')](config['root'],'server/files/images/logos/'));},'filename':function(_0x5beb35,_0x36b5d1,_0x48bb9f){_0x48bb9f(null,util[_0xfdb4('0x1a')](_0xfdb4('0x21'),_0xfdb4('0x25'),path[_0xfdb4('0x1c')](_0x36b5d1[_0xfdb4('0x1d')])));}})});router[_0xfdb4('0x1e')](_0xfdb4('0x15'),upload['single']('file'),controller[_0xfdb4('0x26')]);router[_0xfdb4('0x27')](_0xfdb4('0xc'),auth[_0xfdb4('0x8')](),controller[_0xfdb4('0x28')]);module[_0xfdb4('0x29')]=router;