Built motion from commit (unavailable).|2.3.98
[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 _0x08f5=['request','then','info','request\x20sent','debug','UserProfileSection,\x20%s,\x20%s,\x20%s','stringify','code','error','message','UserProfileSection,\x20%s,\x20%s','result','catch','lodash','util','randomstring','ioredis','../../config/logger','../../config/environment','jayson/promise','http'];(function(_0x2b84a7,_0xedf6d6){var _0x209cd4=function(_0x962d40){while(--_0x962d40){_0x2b84a7['push'](_0x2b84a7['shift']());}};_0x209cd4(++_0xedf6d6);}(_0x08f5,0x172));var _0x508f=function(_0x386187,_0x1ad2ac){_0x386187=_0x386187-0x0;var _0x4abeaa=_0x08f5[_0x386187];return _0x4abeaa;};'use strict';var _=require(_0x508f('0x0'));var util=require(_0x508f('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x508f('0x2'));var fs=require('fs');var Redis=require(_0x508f('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x508f('0x4'))('rpc');var config=require(_0x508f('0x5'));var jayson=require(_0x508f('0x6'));var client=jayson['client'][_0x508f('0x7')]({'port':0x232a});function respondWithRpcPromise(_0xe9c8f5,_0xb4deb1,_0x1d73b2){return new BPromise(function(_0x4d260a,_0x58a42a){return client[_0x508f('0x8')](_0xe9c8f5,_0x1d73b2)[_0x508f('0x9')](function(_0x5d9fa3){logger[_0x508f('0xa')]('UserProfileSection,\x20%s,\x20%s',_0xb4deb1,_0x508f('0xb'));logger[_0x508f('0xc')](_0x508f('0xd'),_0xb4deb1,_0x508f('0xb'),JSON[_0x508f('0xe')](_0x5d9fa3));if(_0x5d9fa3['error']){if(_0x5d9fa3['error'][_0x508f('0xf')]===0x1f4){logger[_0x508f('0x10')]('UserProfileSection,\x20%s,\x20%s',_0xb4deb1,_0x5d9fa3[_0x508f('0x10')][_0x508f('0x11')]);return _0x58a42a(_0x5d9fa3[_0x508f('0x10')]['message']);}logger['error'](_0x508f('0x12'),_0xb4deb1,_0x5d9fa3[_0x508f('0x10')][_0x508f('0x11')]);return _0x4d260a(_0x5d9fa3['error'][_0x508f('0x11')]);}else{logger[_0x508f('0xa')]('UserProfileSection,\x20%s,\x20%s',_0xb4deb1,_0x508f('0xb'));_0x4d260a(_0x5d9fa3[_0x508f('0x13')][_0x508f('0x11')]);}})[_0x508f('0x14')](function(_0x24f8f9){logger[_0x508f('0x10')](_0x508f('0x12'),_0xb4deb1,_0x24f8f9);_0x58a42a(_0x24f8f9);});});}