Built motion from commit (unavailable).|2.5.13
[motion2.git] / server / api / jscriptyQuestionReport / jscriptyQuestionReport.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 _0x731c=['../../config/environment','jayson/promise','client','then','info','JscriptyQuestionReport,\x20%s,\x20%s','request\x20sent','error','code','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x1d2b67,_0x48a393){var _0x5ea408=function(_0x9f7786){while(--_0x9f7786){_0x1d2b67['push'](_0x1d2b67['shift']());}};_0x5ea408(++_0x48a393);}(_0x731c,0xc8));var _0xc731=function(_0x8d865e,_0x20e3b4){_0x8d865e=_0x8d865e-0x0;var _0x3867c8=_0x731c[_0x8d865e];return _0x3867c8;};'use strict';var _=require(_0xc731('0x0'));var util=require(_0xc731('0x1'));var moment=require(_0xc731('0x2'));var BPromise=require(_0xc731('0x3'));var rs=require(_0xc731('0x4'));var fs=require('fs');var Redis=require(_0xc731('0x5'));var db=require(_0xc731('0x6'))['db'];var utils=require(_0xc731('0x7'));var logger=require(_0xc731('0x8'))(_0xc731('0x9'));var config=require(_0xc731('0xa'));var jayson=require(_0xc731('0xb'));var client=jayson[_0xc731('0xc')]['http']({'port':0x232a});function respondWithRpcPromise(_0x420c00,_0x17e625,_0x5908ef){return new BPromise(function(_0x2c152d,_0x23e07b){return client['request'](_0x420c00,_0x5908ef)[_0xc731('0xd')](function(_0x2ac440){logger[_0xc731('0xe')](_0xc731('0xf'),_0x17e625,_0xc731('0x10'));logger['debug']('JscriptyQuestionReport,\x20%s,\x20%s,\x20%s',_0x17e625,_0xc731('0x10'),JSON['stringify'](_0x2ac440));if(_0x2ac440[_0xc731('0x11')]){if(_0x2ac440[_0xc731('0x11')][_0xc731('0x12')]===0x1f4){logger['error']('JscriptyQuestionReport,\x20%s,\x20%s',_0x17e625,_0x2ac440[_0xc731('0x11')]['message']);return _0x23e07b(_0x2ac440['error'][_0xc731('0x13')]);}logger[_0xc731('0x11')](_0xc731('0xf'),_0x17e625,_0x2ac440[_0xc731('0x11')][_0xc731('0x13')]);return _0x2c152d(_0x2ac440[_0xc731('0x11')][_0xc731('0x13')]);}else{logger[_0xc731('0xe')](_0xc731('0xf'),_0x17e625,_0xc731('0x10'));_0x2c152d(_0x2ac440['result'][_0xc731('0x13')]);}})[_0xc731('0x14')](function(_0x11ada0){logger['error']('JscriptyQuestionReport,\x20%s,\x20%s',_0x17e625,_0x11ada0);_0x23e07b(_0x11ada0);});});}