Built motion from commit 67e5df37.|2.0.68
[motion2.git] / server / api / jscriptyQuestionReport / jscriptyQuestionReport.rpc.js
index 91b234d..684d998 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7e45=['client','http','request','JscriptyQuestionReport,\x20%s,\x20%s','request\x20sent','debug','JscriptyQuestionReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','jayson/promise'];(function(_0x44d382,_0x5b9e35){var _0x4689a9=function(_0x301a16){while(--_0x301a16){_0x44d382['push'](_0x44d382['shift']());}};_0x4689a9(++_0x5b9e35);}(_0x7e45,0xb5));var _0x57e4=function(_0x18ac3f,_0x386630){_0x18ac3f=_0x18ac3f-0x0;var _0x4c6563=_0x7e45[_0x18ac3f];return _0x4c6563;};'use strict';var _=require(_0x57e4('0x0'));var util=require(_0x57e4('0x1'));var moment=require('moment');var BPromise=require(_0x57e4('0x2'));var rs=require(_0x57e4('0x3'));var fs=require('fs');var db=require(_0x57e4('0x4'))['db'];var utils=require(_0x57e4('0x5'));var logger=require('../../config/logger')(_0x57e4('0x6'));var config=require('../../config/environment');var jayson=require(_0x57e4('0x7'));var client=jayson[_0x57e4('0x8')][_0x57e4('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4288a5,_0x190ca5,_0x532ecc){return new BPromise(function(_0x361f7c,_0x46e983){return client[_0x57e4('0xa')](_0x4288a5,_0x532ecc)['then'](function(_0x1e3398){logger['info'](_0x57e4('0xb'),_0x190ca5,_0x57e4('0xc'));logger[_0x57e4('0xd')](_0x57e4('0xe'),_0x190ca5,_0x57e4('0xc'),JSON[_0x57e4('0xf')](_0x1e3398));if(_0x1e3398[_0x57e4('0x10')]){if(_0x1e3398[_0x57e4('0x10')][_0x57e4('0x11')]===0x1f4){logger[_0x57e4('0x10')](_0x57e4('0xb'),_0x190ca5,_0x1e3398['error'][_0x57e4('0x12')]);return _0x46e983(_0x1e3398[_0x57e4('0x10')][_0x57e4('0x12')]);}logger[_0x57e4('0x10')](_0x57e4('0xb'),_0x190ca5,_0x1e3398[_0x57e4('0x10')][_0x57e4('0x12')]);return _0x361f7c(_0x1e3398[_0x57e4('0x10')][_0x57e4('0x12')]);}else{logger['info'](_0x57e4('0xb'),_0x190ca5,'request\x20sent');_0x361f7c(_0x1e3398[_0x57e4('0x13')][_0x57e4('0x12')]);}})[_0x57e4('0x14')](function(_0x4700cd){logger['error'](_0x57e4('0xb'),_0x190ca5,_0x4700cd);_0x46e983(_0x4700cd);});});}
\ No newline at end of file
+var _0xa843=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','then','JscriptyQuestionReport,\x20%s,\x20%s','request\x20sent','error','message','info','result','lodash','util','bluebird','randomstring'];(function(_0x5aa852,_0x2496f){var _0x23c38e=function(_0x21edc0){while(--_0x21edc0){_0x5aa852['push'](_0x5aa852['shift']());}};_0x23c38e(++_0x2496f);}(_0xa843,0xd9));var _0x3a84=function(_0x207700,_0x219bb6){_0x207700=_0x207700-0x0;var _0x1a1bbc=_0xa843[_0x207700];return _0x1a1bbc;};'use strict';var _=require(_0x3a84('0x0'));var util=require(_0x3a84('0x1'));var moment=require('moment');var BPromise=require(_0x3a84('0x2'));var rs=require(_0x3a84('0x3'));var fs=require('fs');var db=require(_0x3a84('0x4'))['db'];var utils=require(_0x3a84('0x5'));var logger=require(_0x3a84('0x6'))(_0x3a84('0x7'));var config=require(_0x3a84('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x3a84('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x532a72,_0x3cf96d,_0x217011){return new BPromise(function(_0x45e438,_0x5b7e5d){return client['request'](_0x532a72,_0x217011)[_0x3a84('0xa')](function(_0x39ae3c){logger['info'](_0x3a84('0xb'),_0x3cf96d,_0x3a84('0xc'));logger['debug']('JscriptyQuestionReport,\x20%s,\x20%s,\x20%s',_0x3cf96d,_0x3a84('0xc'),JSON['stringify'](_0x39ae3c));if(_0x39ae3c['error']){if(_0x39ae3c[_0x3a84('0xd')]['code']===0x1f4){logger[_0x3a84('0xd')](_0x3a84('0xb'),_0x3cf96d,_0x39ae3c[_0x3a84('0xd')][_0x3a84('0xe')]);return _0x5b7e5d(_0x39ae3c[_0x3a84('0xd')]['message']);}logger[_0x3a84('0xd')](_0x3a84('0xb'),_0x3cf96d,_0x39ae3c[_0x3a84('0xd')][_0x3a84('0xe')]);return _0x45e438(_0x39ae3c['error'][_0x3a84('0xe')]);}else{logger[_0x3a84('0xf')](_0x3a84('0xb'),_0x3cf96d,'request\x20sent');_0x45e438(_0x39ae3c[_0x3a84('0x10')]['message']);}})['catch'](function(_0x51d9fb){logger[_0x3a84('0xd')](_0x3a84('0xb'),_0x3cf96d,_0x51d9fb);_0x5b7e5d(_0x51d9fb);});});}
\ No newline at end of file