Built motion from commit (unavailable).|2.5.13
[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 _0x93a4=['/:id/logo_login','addLogoLogin','preferred','originalname','post','addPreferred','format','favicon','addFavicon','put','exports','multer','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./setting.controller','get','isAuthenticated','index','/now','getDate','/:id','/:id/logo','getLogoLogin','gdpr','/:id/preferred','getPreferred','/:id/favicon','diskStorage','join','root','server/files/images/logos/','%s%s','logo','extname','single','file','addLogo','logologin'];(function(_0x24eda0,_0x498d8f){var _0x428f02=function(_0x503a97){while(--_0x503a97){_0x24eda0['push'](_0x24eda0['shift']());}};_0x428f02(++_0x498d8f);}(_0x93a4,0x1af));var _0x493a=function(_0x3b6a0d,_0x1bb010){_0x3b6a0d=_0x3b6a0d-0x0;var _0x31506a=_0x93a4[_0x3b6a0d];return _0x31506a;};'use strict';var multer=require(_0x493a('0x0'));var util=require('util');var path=require(_0x493a('0x1'));var timeout=require(_0x493a('0x2'));var express=require(_0x493a('0x3'));var router=express[_0x493a('0x4')]();var auth=require('../../components/auth/service');var interaction=require(_0x493a('0x5'));var config=require(_0x493a('0x6'));var controller=require(_0x493a('0x7'));router[_0x493a('0x8')]('/',auth[_0x493a('0x9')](),controller[_0x493a('0xa')]);router[_0x493a('0x8')](_0x493a('0xb'),controller[_0x493a('0xc')]);router[_0x493a('0x8')](_0x493a('0xd'),controller['show']);router[_0x493a('0x8')](_0x493a('0xe'),controller['getLogo']);router[_0x493a('0x8')]('/:id/logo_login',controller[_0x493a('0xf')]);router[_0x493a('0x8')]('/:id/gdpr',controller[_0x493a('0x10')]);router['get'](_0x493a('0x11'),controller[_0x493a('0x12')]);router['get'](_0x493a('0x13'),controller['getFavicon']);var upload=multer({'storage':multer[_0x493a('0x14')]({'destination':function(_0x12446a,_0x4d854f,_0x4fecab){_0x4fecab(null,path[_0x493a('0x15')](config[_0x493a('0x16')],_0x493a('0x17')));},'filename':function(_0x1c14dc,_0x374732,_0x5f0460){_0x5f0460(null,util['format'](_0x493a('0x18'),_0x493a('0x19'),path[_0x493a('0x1a')](_0x374732['originalname'])));}})});router['post'](_0x493a('0xe'),upload[_0x493a('0x1b')](_0x493a('0x1c')),controller[_0x493a('0x1d')]);var upload=multer({'storage':multer[_0x493a('0x14')]({'destination':function(_0x585874,_0x3549c6,_0x35a847){_0x35a847(null,path['join'](config['root'],_0x493a('0x17')));},'filename':function(_0x2f04b1,_0x4f4d10,_0x56f84a){_0x56f84a(null,util['format'](_0x493a('0x18'),_0x493a('0x1e'),path[_0x493a('0x1a')](_0x4f4d10['originalname'])));}})});router['post'](_0x493a('0x1f'),upload[_0x493a('0x1b')]('file'),controller[_0x493a('0x20')]);var upload=multer({'storage':multer[_0x493a('0x14')]({'destination':function(_0x36c4ef,_0x41b811,_0x5b02ed){_0x5b02ed(null,path[_0x493a('0x15')](config[_0x493a('0x16')],_0x493a('0x17')));},'filename':function(_0x3966f8,_0x2b0b8c,_0x45283b){_0x45283b(null,util['format'](_0x493a('0x18'),_0x493a('0x21'),path[_0x493a('0x1a')](_0x2b0b8c[_0x493a('0x22')])));}})});router[_0x493a('0x23')](_0x493a('0x11'),upload[_0x493a('0x1b')](_0x493a('0x1c')),controller[_0x493a('0x24')]);var upload=multer({'storage':multer[_0x493a('0x14')]({'destination':function(_0x207942,_0x5e06cb,_0x5f4531){_0x5f4531(null,path[_0x493a('0x15')](config[_0x493a('0x16')],'server/files/images/logos/'));},'filename':function(_0x38f1f2,_0x134425,_0x487853){_0x487853(null,util[_0x493a('0x25')](_0x493a('0x18'),_0x493a('0x26'),path[_0x493a('0x1a')](_0x134425[_0x493a('0x22')])));}})});router[_0x493a('0x23')](_0x493a('0x13'),upload[_0x493a('0x1b')](_0x493a('0x1c')),controller[_0x493a('0x27')]);router[_0x493a('0x28')](_0x493a('0xd'),auth[_0x493a('0x9')](),controller['update']);module[_0x493a('0x29')]=router;