Built motion from commit (unavailable).|2.0.72
[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 _0xe8b2=['update','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','./setting.controller','get','show','/:id/logo','/:id/gdpr','gdpr','diskStorage','join','root','server/files/images/logos/','format','logo','originalname','post','single','file','addLogo','%s%s','logologin','extname','addLogoLogin','/:id','isAuthenticated'];(function(_0x128832,_0x480891){var _0x245228=function(_0x4e1641){while(--_0x4e1641){_0x128832['push'](_0x128832['shift']());}};_0x245228(++_0x480891);}(_0xe8b2,0x7d));var _0x2e8b=function(_0x5d8604,_0x135606){_0x5d8604=_0x5d8604-0x0;var _0x49e35a=_0xe8b2[_0x5d8604];return _0x49e35a;};'use strict';var multer=require(_0x2e8b('0x0'));var util=require(_0x2e8b('0x1'));var path=require(_0x2e8b('0x2'));var express=require(_0x2e8b('0x3'));var router=express[_0x2e8b('0x4')]();var auth=require(_0x2e8b('0x5'));var interaction=require(_0x2e8b('0x6'));var config=require('../../config/environment');var controller=require(_0x2e8b('0x7'));router[_0x2e8b('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0x2e8b('0x8')]('/:id',controller[_0x2e8b('0x9')]);router[_0x2e8b('0x8')](_0x2e8b('0xa'),controller['getLogo']);router['get']('/:id/logo_login',controller['getLogoLogin']);router[_0x2e8b('0x8')](_0x2e8b('0xb'),controller[_0x2e8b('0xc')]);var upload=multer({'storage':multer[_0x2e8b('0xd')]({'destination':function(_0x48f050,_0x486ce2,_0x2c61f0){_0x2c61f0(null,path[_0x2e8b('0xe')](config[_0x2e8b('0xf')],_0x2e8b('0x10')));},'filename':function(_0x447a07,_0x599888,_0x5240ff){_0x5240ff(null,util[_0x2e8b('0x11')]('%s%s',_0x2e8b('0x12'),path['extname'](_0x599888[_0x2e8b('0x13')])));}})});router[_0x2e8b('0x14')](_0x2e8b('0xa'),upload[_0x2e8b('0x15')](_0x2e8b('0x16')),controller[_0x2e8b('0x17')]);var upload=multer({'storage':multer[_0x2e8b('0xd')]({'destination':function(_0x1230ae,_0x5b08cd,_0x59f523){_0x59f523(null,path[_0x2e8b('0xe')](config[_0x2e8b('0xf')],_0x2e8b('0x10')));},'filename':function(_0x89d3b1,_0x1c954e,_0x20a731){_0x20a731(null,util[_0x2e8b('0x11')](_0x2e8b('0x18'),_0x2e8b('0x19'),path[_0x2e8b('0x1a')](_0x1c954e[_0x2e8b('0x13')])));}})});router[_0x2e8b('0x14')]('/:id/logo_login',upload[_0x2e8b('0x15')]('file'),controller[_0x2e8b('0x1b')]);router['put'](_0x2e8b('0x1c'),auth[_0x2e8b('0x1d')](),controller[_0x2e8b('0x1e')]);module['exports']=router;