Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / intZendeskField / intZendeskField.rpc.js
index 5407de9..00c1942 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4ec8=['error','message','result','catch','lodash','moment','bluebird','../../mysqldb','../../config/utils','../../config/environment','client','http','request','then','info','ZendeskField,\x20%s,\x20%s','request\x20sent','ZendeskField,\x20%s,\x20%s,\x20%s','code'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x4ec8,0x180));var _0x84ec=function(_0x2087cf,_0x5021f9){_0x2087cf=_0x2087cf-0x0;var _0x5d1fb3=_0x4ec8[_0x2087cf];return _0x5d1fb3;};'use strict';var _=require(_0x84ec('0x0'));var util=require('util');var moment=require(_0x84ec('0x1'));var BPromise=require(_0x84ec('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x84ec('0x3'))['db'];var utils=require(_0x84ec('0x4'));var logger=require('../../config/logger')('rpc');var config=require(_0x84ec('0x5'));var jayson=require('jayson/promise');var client=jayson[_0x84ec('0x6')][_0x84ec('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x26c2a5,_0x258bf8,_0x166894){return new BPromise(function(_0x53c08b,_0x308a19){return client[_0x84ec('0x8')](_0x26c2a5,_0x166894)[_0x84ec('0x9')](function(_0x25a0d2){logger[_0x84ec('0xa')](_0x84ec('0xb'),_0x258bf8,_0x84ec('0xc'));logger['debug'](_0x84ec('0xd'),_0x258bf8,_0x84ec('0xc'),JSON['stringify'](_0x25a0d2));if(_0x25a0d2['error']){if(_0x25a0d2['error'][_0x84ec('0xe')]===0x1f4){logger[_0x84ec('0xf')](_0x84ec('0xb'),_0x258bf8,_0x25a0d2[_0x84ec('0xf')][_0x84ec('0x10')]);return _0x308a19(_0x25a0d2[_0x84ec('0xf')][_0x84ec('0x10')]);}logger[_0x84ec('0xf')](_0x84ec('0xb'),_0x258bf8,_0x25a0d2[_0x84ec('0xf')][_0x84ec('0x10')]);return _0x53c08b(_0x25a0d2[_0x84ec('0xf')][_0x84ec('0x10')]);}else{logger[_0x84ec('0xa')](_0x84ec('0xb'),_0x258bf8,_0x84ec('0xc'));_0x53c08b(_0x25a0d2[_0x84ec('0x11')][_0x84ec('0x10')]);}})[_0x84ec('0x12')](function(_0x13113f){logger[_0x84ec('0xf')](_0x84ec('0xb'),_0x258bf8,_0x13113f);_0x308a19(_0x13113f);});});}
\ No newline at end of file
+var _0xc43f=['client','request','then','info','ZendeskField,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise'];(function(_0x56eb02,_0x1f4beb){var _0x535ee4=function(_0xd143ba){while(--_0xd143ba){_0x56eb02['push'](_0x56eb02['shift']());}};_0x535ee4(++_0x1f4beb);}(_0xc43f,0x120));var _0xfc43=function(_0x2cdf5b,_0x41eece){_0x2cdf5b=_0x2cdf5b-0x0;var _0x87798e=_0xc43f[_0x2cdf5b];return _0x87798e;};'use strict';var _=require(_0xfc43('0x0'));var util=require(_0xfc43('0x1'));var moment=require(_0xfc43('0x2'));var BPromise=require(_0xfc43('0x3'));var rs=require(_0xfc43('0x4'));var fs=require('fs');var Redis=require(_0xfc43('0x5'));var db=require(_0xfc43('0x6'))['db'];var utils=require(_0xfc43('0x7'));var logger=require('../../config/logger')(_0xfc43('0x8'));var config=require(_0xfc43('0x9'));var jayson=require(_0xfc43('0xa'));var client=jayson[_0xfc43('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x241725,_0x91ede3,_0x5c032c){return new BPromise(function(_0x218a81,_0x943dd9){return client[_0xfc43('0xc')](_0x241725,_0x5c032c)[_0xfc43('0xd')](function(_0x49cd71){logger[_0xfc43('0xe')](_0xfc43('0xf'),_0x91ede3,_0xfc43('0x10'));logger[_0xfc43('0x11')]('ZendeskField,\x20%s,\x20%s,\x20%s',_0x91ede3,_0xfc43('0x10'),JSON[_0xfc43('0x12')](_0x49cd71));if(_0x49cd71[_0xfc43('0x13')]){if(_0x49cd71[_0xfc43('0x13')][_0xfc43('0x14')]===0x1f4){logger[_0xfc43('0x13')](_0xfc43('0xf'),_0x91ede3,_0x49cd71[_0xfc43('0x13')][_0xfc43('0x15')]);return _0x943dd9(_0x49cd71['error'][_0xfc43('0x15')]);}logger['error'](_0xfc43('0xf'),_0x91ede3,_0x49cd71[_0xfc43('0x13')][_0xfc43('0x15')]);return _0x218a81(_0x49cd71[_0xfc43('0x13')][_0xfc43('0x15')]);}else{logger[_0xfc43('0xe')](_0xfc43('0xf'),_0x91ede3,_0xfc43('0x10'));_0x218a81(_0x49cd71['result'][_0xfc43('0x15')]);}})[_0xfc43('0x16')](function(_0xfeb098){logger[_0xfc43('0x13')](_0xfc43('0xf'),_0x91ede3,_0xfeb098);_0x943dd9(_0xfeb098);});});}
\ No newline at end of file