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 _0xa1fd=['join','server/files/images/logos/','logo','extname','originalname','post','/:id/logo','single','file','addLogo','root','%s%s','addLogoLogin','format','/:id/preferred','addFavicon','put','update','exports','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/:id','show','getLogo','/:id/logo_login','getLogoLogin','/:id/gdpr','getPreferred','/:id/favicon','diskStorage'];(function(_0x47fd36,_0x41535d){var _0x21a0fc=function(_0x44c07c){while(--_0x44c07c){_0x47fd36['push'](_0x47fd36['shift']());}};_0x21a0fc(++_0x41535d);}(_0xa1fd,0x85));var _0xda1f=function(_0x472ee2,_0x295444){_0x472ee2=_0x472ee2-0x0;var _0x18387b=_0xa1fd[_0x472ee2];return _0x18387b;};'use strict';var multer=require('multer');var util=require(_0xda1f('0x0'));var path=require(_0xda1f('0x1'));var timeout=require(_0xda1f('0x2'));var express=require(_0xda1f('0x3'));var router=express[_0xda1f('0x4')]();var auth=require(_0xda1f('0x5'));var interaction=require(_0xda1f('0x6'));var config=require('../../config/environment');var controller=require('./setting.controller');router[_0xda1f('0x7')]('/',auth[_0xda1f('0x8')](),controller[_0xda1f('0x9')]);router[_0xda1f('0x7')](_0xda1f('0xa'),controller[_0xda1f('0xb')]);router['get']('/:id/logo',controller[_0xda1f('0xc')]);router[_0xda1f('0x7')](_0xda1f('0xd'),controller[_0xda1f('0xe')]);router[_0xda1f('0x7')](_0xda1f('0xf'),controller['gdpr']);router['get']('/:id/preferred',controller[_0xda1f('0x10')]);router['get'](_0xda1f('0x11'),controller['getFavicon']);var upload=multer({'storage':multer[_0xda1f('0x12')]({'destination':function(_0x2b17c4,_0x1d2400,_0x3814f1){_0x3814f1(null,path[_0xda1f('0x13')](config['root'],_0xda1f('0x14')));},'filename':function(_0x2e4361,_0x3a96bc,_0x5abe72){_0x5abe72(null,util['format']('%s%s',_0xda1f('0x15'),path[_0xda1f('0x16')](_0x3a96bc[_0xda1f('0x17')])));}})});router[_0xda1f('0x18')](_0xda1f('0x19'),upload[_0xda1f('0x1a')](_0xda1f('0x1b')),controller[_0xda1f('0x1c')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x25089a,_0x339ee6,_0x113618){_0x113618(null,path[_0xda1f('0x13')](config[_0xda1f('0x1d')],_0xda1f('0x14')));},'filename':function(_0x41b1c8,_0x209bdc,_0x57ac50){_0x57ac50(null,util['format'](_0xda1f('0x1e'),'logologin',path[_0xda1f('0x16')](_0x209bdc[_0xda1f('0x17')])));}})});router[_0xda1f('0x18')](_0xda1f('0xd'),upload[_0xda1f('0x1a')](_0xda1f('0x1b')),controller[_0xda1f('0x1f')]);var upload=multer({'storage':multer[_0xda1f('0x12')]({'destination':function(_0x62f876,_0x1d7987,_0x5a2487){_0x5a2487(null,path[_0xda1f('0x13')](config[_0xda1f('0x1d')],_0xda1f('0x14')));},'filename':function(_0x30b9ad,_0x5b613f,_0x11b5ea){_0x11b5ea(null,util[_0xda1f('0x20')](_0xda1f('0x1e'),'preferred',path[_0xda1f('0x16')](_0x5b613f[_0xda1f('0x17')])));}})});router['post'](_0xda1f('0x21'),upload['single']('file'),controller['addPreferred']);var upload=multer({'storage':multer[_0xda1f('0x12')]({'destination':function(_0x5a7968,_0x3a34c7,_0x2cf993){_0x2cf993(null,path['join'](config[_0xda1f('0x1d')],_0xda1f('0x14')));},'filename':function(_0xfdc709,_0x2c95d2,_0x2d8e11){_0x2d8e11(null,util['format'](_0xda1f('0x1e'),'favicon',path['extname'](_0x2c95d2[_0xda1f('0x17')])));}})});router[_0xda1f('0x18')](_0xda1f('0x11'),upload[_0xda1f('0x1a')](_0xda1f('0x1b')),controller[_0xda1f('0x22')]);router[_0xda1f('0x23')](_0xda1f('0xa'),auth[_0xda1f('0x8')](),controller[_0xda1f('0x24')]);module[_0xda1f('0x25')]=router;