Built motion from commit 0bd120ac.|2.6.25
[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 _0x4978=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','info','debug','JscriptyQuestionReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','JscriptyQuestionReport,\x20%s,\x20%s','catch','lodash','util','moment'];(function(_0x171dbc,_0x1e46fe){var _0x455fc6=function(_0xd4cf8){while(--_0xd4cf8){_0x171dbc['push'](_0x171dbc['shift']());}};_0x455fc6(++_0x1e46fe);}(_0x4978,0x14d));var _0x8497=function(_0x2bb930,_0xe92f28){_0x2bb930=_0x2bb930-0x0;var _0x4a7d19=_0x4978[_0x2bb930];return _0x4a7d19;};'use strict';var _=require(_0x8497('0x0'));var util=require(_0x8497('0x1'));var moment=require(_0x8497('0x2'));var BPromise=require(_0x8497('0x3'));var rs=require(_0x8497('0x4'));var fs=require('fs');var Redis=require(_0x8497('0x5'));var db=require(_0x8497('0x6'))['db'];var utils=require(_0x8497('0x7'));var logger=require(_0x8497('0x8'))(_0x8497('0x9'));var config=require(_0x8497('0xa'));var jayson=require(_0x8497('0xb'));var client=jayson[_0x8497('0xc')]['http']({'port':0x232a});function respondWithRpcPromise(_0x248a54,_0x102197,_0x8e619f){return new BPromise(function(_0x3dc413,_0x1e3cee){return client[_0x8497('0xd')](_0x248a54,_0x8e619f)['then'](function(_0x351da2){logger[_0x8497('0xe')]('JscriptyQuestionReport,\x20%s,\x20%s',_0x102197,'request\x20sent');logger[_0x8497('0xf')](_0x8497('0x10'),_0x102197,_0x8497('0x11'),JSON[_0x8497('0x12')](_0x351da2));if(_0x351da2[_0x8497('0x13')]){if(_0x351da2[_0x8497('0x13')][_0x8497('0x14')]===0x1f4){logger[_0x8497('0x13')]('JscriptyQuestionReport,\x20%s,\x20%s',_0x102197,_0x351da2['error'][_0x8497('0x15')]);return _0x1e3cee(_0x351da2[_0x8497('0x13')]['message']);}logger[_0x8497('0x13')](_0x8497('0x16'),_0x102197,_0x351da2['error'][_0x8497('0x15')]);return _0x3dc413(_0x351da2[_0x8497('0x13')][_0x8497('0x15')]);}else{logger[_0x8497('0xe')]('JscriptyQuestionReport,\x20%s,\x20%s',_0x102197,_0x8497('0x11'));_0x3dc413(_0x351da2['result'][_0x8497('0x15')]);}})[_0x8497('0x17')](function(_0xd81778){logger[_0x8497('0x13')]('JscriptyQuestionReport,\x20%s,\x20%s',_0x102197,_0xd81778);_0x1e3cee(_0xd81778);});});}