Built motion from commit (unavailable).|2.5.17
[motion2.git] / server / api / jscriptyAnswerReport / jscriptyAnswerReport.rpc.js
index ddf60fa..654c587 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcc6b=['catch','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','JscriptyAnswerReport,\x20%s,\x20%s','request\x20sent','debug','JscriptyAnswerReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0xcc6b,0x19f));var _0xbcc6=function(_0x509dcb,_0x2059f4){_0x509dcb=_0x509dcb-0x0;var _0x2860ba=_0xcc6b[_0x509dcb];return _0x2860ba;};'use strict';var _=require('lodash');var util=require(_0xbcc6('0x0'));var moment=require(_0xbcc6('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xbcc6('0x2'));var db=require(_0xbcc6('0x3'))['db'];var utils=require(_0xbcc6('0x4'));var logger=require(_0xbcc6('0x5'))(_0xbcc6('0x6'));var config=require(_0xbcc6('0x7'));var jayson=require(_0xbcc6('0x8'));var client=jayson[_0xbcc6('0x9')][_0xbcc6('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xb8acf4,_0x211903,_0x262f57){return new BPromise(function(_0x1733c2,_0x137d04){return client[_0xbcc6('0xb')](_0xb8acf4,_0x262f57)['then'](function(_0x4b2f04){logger['info'](_0xbcc6('0xc'),_0x211903,_0xbcc6('0xd'));logger[_0xbcc6('0xe')](_0xbcc6('0xf'),_0x211903,'request\x20sent',JSON[_0xbcc6('0x10')](_0x4b2f04));if(_0x4b2f04['error']){if(_0x4b2f04[_0xbcc6('0x11')][_0xbcc6('0x12')]===0x1f4){logger[_0xbcc6('0x11')](_0xbcc6('0xc'),_0x211903,_0x4b2f04[_0xbcc6('0x11')][_0xbcc6('0x13')]);return _0x137d04(_0x4b2f04[_0xbcc6('0x11')][_0xbcc6('0x13')]);}logger[_0xbcc6('0x11')](_0xbcc6('0xc'),_0x211903,_0x4b2f04[_0xbcc6('0x11')]['message']);return _0x1733c2(_0x4b2f04[_0xbcc6('0x11')][_0xbcc6('0x13')]);}else{logger[_0xbcc6('0x14')](_0xbcc6('0xc'),_0x211903,_0xbcc6('0xd'));_0x1733c2(_0x4b2f04[_0xbcc6('0x15')][_0xbcc6('0x13')]);}})[_0xbcc6('0x16')](function(_0x54a5d7){logger['error'](_0xbcc6('0xc'),_0x211903,_0x54a5d7);_0x137d04(_0x54a5d7);});});}
\ No newline at end of file
+var _0xc9ec=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','JscriptyAnswerReport,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','lodash','randomstring','../../mysqldb'];(function(_0x32f7d7,_0x54231b){var _0x133d09=function(_0x41a7ab){while(--_0x41a7ab){_0x32f7d7['push'](_0x32f7d7['shift']());}};_0x133d09(++_0x54231b);}(_0xc9ec,0x9f));var _0xcc9e=function(_0x22eb96,_0x3c2d8d){_0x22eb96=_0x22eb96-0x0;var _0x5e1adf=_0xc9ec[_0x22eb96];return _0x5e1adf;};'use strict';var _=require(_0xcc9e('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xcc9e('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xcc9e('0x2'))['db'];var utils=require('../../config/utils');var logger=require(_0xcc9e('0x3'))(_0xcc9e('0x4'));var config=require(_0xcc9e('0x5'));var jayson=require(_0xcc9e('0x6'));var client=jayson[_0xcc9e('0x7')][_0xcc9e('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2f0c5b,_0x46e381,_0xd64473){return new BPromise(function(_0x446529,_0x5a1295){return client['request'](_0x2f0c5b,_0xd64473)[_0xcc9e('0x9')](function(_0x5f4cad){logger[_0xcc9e('0xa')](_0xcc9e('0xb'),_0x46e381,'request\x20sent');logger['debug']('JscriptyAnswerReport,\x20%s,\x20%s,\x20%s',_0x46e381,_0xcc9e('0xc'),JSON[_0xcc9e('0xd')](_0x5f4cad));if(_0x5f4cad[_0xcc9e('0xe')]){if(_0x5f4cad['error']['code']===0x1f4){logger[_0xcc9e('0xe')](_0xcc9e('0xb'),_0x46e381,_0x5f4cad[_0xcc9e('0xe')][_0xcc9e('0xf')]);return _0x5a1295(_0x5f4cad[_0xcc9e('0xe')][_0xcc9e('0xf')]);}logger[_0xcc9e('0xe')](_0xcc9e('0xb'),_0x46e381,_0x5f4cad[_0xcc9e('0xe')][_0xcc9e('0xf')]);return _0x446529(_0x5f4cad['error'][_0xcc9e('0xf')]);}else{logger[_0xcc9e('0xa')](_0xcc9e('0xb'),_0x46e381,_0xcc9e('0xc'));_0x446529(_0x5f4cad[_0xcc9e('0x10')]['message']);}})[_0xcc9e('0x11')](function(_0xd960d0){logger['error'](_0xcc9e('0xb'),_0x46e381,_0xd960d0);_0x5a1295(_0xd960d0);});});}
\ No newline at end of file