Built motion from commit (unavailable).|2.5.13
[motion2.git] / server / api / userProfileSection / userProfileSection.rpc.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 _0x2359=['error','code','message','catch','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','UserProfileSection,\x20%s,\x20%s','request\x20sent','debug','UserProfileSection,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x384a73,_0x347e40){var _0x3c9c8d=function(_0x488cfd){while(--_0x488cfd){_0x384a73['push'](_0x384a73['shift']());}};_0x3c9c8d(++_0x347e40);}(_0x2359,0x1a2));var _0x9235=function(_0x13d07a,_0x41efc3){_0x13d07a=_0x13d07a-0x0;var _0x5ee0ee=_0x2359[_0x13d07a];return _0x5ee0ee;};'use strict';var _=require('lodash');var util=require(_0x9235('0x0'));var moment=require(_0x9235('0x1'));var BPromise=require(_0x9235('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9235('0x3'));var db=require(_0x9235('0x4'))['db'];var utils=require(_0x9235('0x5'));var logger=require(_0x9235('0x6'))(_0x9235('0x7'));var config=require(_0x9235('0x8'));var jayson=require(_0x9235('0x9'));var client=jayson[_0x9235('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x83d513,_0x38302f,_0x4947cc){return new BPromise(function(_0x41fb3f,_0x27e636){return client[_0x9235('0xb')](_0x83d513,_0x4947cc)[_0x9235('0xc')](function(_0x58aac0){logger[_0x9235('0xd')](_0x9235('0xe'),_0x38302f,_0x9235('0xf'));logger[_0x9235('0x10')](_0x9235('0x11'),_0x38302f,_0x9235('0xf'),JSON[_0x9235('0x12')](_0x58aac0));if(_0x58aac0[_0x9235('0x13')]){if(_0x58aac0[_0x9235('0x13')][_0x9235('0x14')]===0x1f4){logger[_0x9235('0x13')](_0x9235('0xe'),_0x38302f,_0x58aac0[_0x9235('0x13')][_0x9235('0x15')]);return _0x27e636(_0x58aac0[_0x9235('0x13')][_0x9235('0x15')]);}logger[_0x9235('0x13')]('UserProfileSection,\x20%s,\x20%s',_0x38302f,_0x58aac0[_0x9235('0x13')][_0x9235('0x15')]);return _0x41fb3f(_0x58aac0['error'][_0x9235('0x15')]);}else{logger[_0x9235('0xd')](_0x9235('0xe'),_0x38302f,_0x9235('0xf'));_0x41fb3f(_0x58aac0['result'][_0x9235('0x15')]);}})[_0x9235('0x16')](function(_0x5520e2){logger[_0x9235('0x13')]('UserProfileSection,\x20%s,\x20%s',_0x38302f,_0x5520e2);_0x27e636(_0x5520e2);});});}