Built motion from commit (unavailable).|2.4.21
[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 _0x5a2e=['UserProfileSection,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info'];(function(_0x39b1f,_0x55ada0){var _0x4b4ead=function(_0xfaf2d5){while(--_0xfaf2d5){_0x39b1f['push'](_0x39b1f['shift']());}};_0x4b4ead(++_0x55ada0);}(_0x5a2e,0x68));var _0xe5a2=function(_0x36aad7,_0x1009f5){_0x36aad7=_0x36aad7-0x0;var _0x48d14b=_0x5a2e[_0x36aad7];return _0x48d14b;};'use strict';var _=require(_0xe5a2('0x0'));var util=require(_0xe5a2('0x1'));var moment=require(_0xe5a2('0x2'));var BPromise=require('bluebird');var rs=require(_0xe5a2('0x3'));var fs=require('fs');var Redis=require(_0xe5a2('0x4'));var db=require(_0xe5a2('0x5'))['db'];var utils=require(_0xe5a2('0x6'));var logger=require(_0xe5a2('0x7'))(_0xe5a2('0x8'));var config=require(_0xe5a2('0x9'));var jayson=require(_0xe5a2('0xa'));var client=jayson[_0xe5a2('0xb')][_0xe5a2('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x38f209,_0x4f6f3b,_0x3b1889){return new BPromise(function(_0x5e8308,_0x1c8d31){return client[_0xe5a2('0xd')](_0x38f209,_0x3b1889)[_0xe5a2('0xe')](function(_0x3a99bf){logger[_0xe5a2('0xf')](_0xe5a2('0x10'),_0x4f6f3b,_0xe5a2('0x11'));logger[_0xe5a2('0x12')]('UserProfileSection,\x20%s,\x20%s,\x20%s',_0x4f6f3b,_0xe5a2('0x11'),JSON[_0xe5a2('0x13')](_0x3a99bf));if(_0x3a99bf['error']){if(_0x3a99bf['error']['code']===0x1f4){logger['error']('UserProfileSection,\x20%s,\x20%s',_0x4f6f3b,_0x3a99bf[_0xe5a2('0x14')][_0xe5a2('0x15')]);return _0x1c8d31(_0x3a99bf[_0xe5a2('0x14')][_0xe5a2('0x15')]);}logger[_0xe5a2('0x14')]('UserProfileSection,\x20%s,\x20%s',_0x4f6f3b,_0x3a99bf['error'][_0xe5a2('0x15')]);return _0x5e8308(_0x3a99bf['error'][_0xe5a2('0x15')]);}else{logger['info'](_0xe5a2('0x10'),_0x4f6f3b,_0xe5a2('0x11'));_0x5e8308(_0x3a99bf[_0xe5a2('0x16')][_0xe5a2('0x15')]);}})[_0xe5a2('0x17')](function(_0x465d53){logger['error']('UserProfileSection,\x20%s,\x20%s',_0x4f6f3b,_0x465d53);_0x1c8d31(_0x465d53);});});}