Built motion from commit (unavailable).|2.5.21
[motion2.git] / server / api / userProfileResource / userProfileResource.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 _0x05ab=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','UserProfileResource,\x20%s,\x20%s','request\x20sent','debug','UserProfileResource,\x20%s,\x20%s,\x20%s','error','code','message','result','lodash','util','moment','bluebird'];(function(_0x2a3afd,_0x5689f4){var _0x50e3b9=function(_0x1181fb){while(--_0x1181fb){_0x2a3afd['push'](_0x2a3afd['shift']());}};_0x50e3b9(++_0x5689f4);}(_0x05ab,0x164));var _0xb05a=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0x05ab[_0x3bf83f];return _0x22c4a9;};'use strict';var _=require(_0xb05a('0x0'));var util=require(_0xb05a('0x1'));var moment=require(_0xb05a('0x2'));var BPromise=require(_0xb05a('0x3'));var rs=require(_0xb05a('0x4'));var fs=require('fs');var Redis=require(_0xb05a('0x5'));var db=require(_0xb05a('0x6'))['db'];var utils=require(_0xb05a('0x7'));var logger=require(_0xb05a('0x8'))(_0xb05a('0x9'));var config=require(_0xb05a('0xa'));var jayson=require(_0xb05a('0xb'));var client=jayson[_0xb05a('0xc')][_0xb05a('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x1cdc47,_0xf27351,_0x135fe5){return new BPromise(function(_0x3d62d5,_0x438bd4){return client[_0xb05a('0xe')](_0x1cdc47,_0x135fe5)['then'](function(_0x3e08ed){logger[_0xb05a('0xf')](_0xb05a('0x10'),_0xf27351,_0xb05a('0x11'));logger[_0xb05a('0x12')](_0xb05a('0x13'),_0xf27351,_0xb05a('0x11'),JSON['stringify'](_0x3e08ed));if(_0x3e08ed[_0xb05a('0x14')]){if(_0x3e08ed[_0xb05a('0x14')][_0xb05a('0x15')]===0x1f4){logger[_0xb05a('0x14')](_0xb05a('0x10'),_0xf27351,_0x3e08ed[_0xb05a('0x14')][_0xb05a('0x16')]);return _0x438bd4(_0x3e08ed[_0xb05a('0x14')][_0xb05a('0x16')]);}logger['error'](_0xb05a('0x10'),_0xf27351,_0x3e08ed['error'][_0xb05a('0x16')]);return _0x3d62d5(_0x3e08ed['error'][_0xb05a('0x16')]);}else{logger[_0xb05a('0xf')](_0xb05a('0x10'),_0xf27351,_0xb05a('0x11'));_0x3d62d5(_0x3e08ed[_0xb05a('0x17')][_0xb05a('0x16')]);}})['catch'](function(_0x66cfe7){logger[_0xb05a('0x14')](_0xb05a('0x10'),_0xf27351,_0x66cfe7);_0x438bd4(_0x66cfe7);});});}