Built motion from commit 511216ff.|2.6.34
[motion2.git] / server / api / intZendeskAccount / intZendeskAccount.rpc.js
index 00d0f3a..67f1000 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x741a=['debug','ZendeskAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','catch','GetZendeskAccount','ZendeskAccount','options','raw','attributes','limit','include','map','model','ShowZendeskAccount','find','where','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/environment','jayson/promise','client','http','request','then','ZendeskAccount,\x20%s,\x20%s'];(function(_0x3b7698,_0x4b0c43){var _0xf3169e=function(_0x17576e){while(--_0x17576e){_0x3b7698['push'](_0x3b7698['shift']());}};_0xf3169e(++_0x4b0c43);}(_0x741a,0x7b));var _0xa741=function(_0x11f249,_0x4ca4a8){_0x11f249=_0x11f249-0x0;var _0x5c3656=_0x741a[_0x11f249];return _0x5c3656;};'use strict';var _=require(_0xa741('0x0'));var util=require(_0xa741('0x1'));var moment=require(_0xa741('0x2'));var BPromise=require(_0xa741('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa741('0x4'));var db=require(_0xa741('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0xa741('0x6'));var jayson=require(_0xa741('0x7'));var client=jayson[_0xa741('0x8')][_0xa741('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x37182c,_0x9b6033,_0x33be28){return new BPromise(function(_0x1e9c51,_0x183e10){return client[_0xa741('0xa')](_0x37182c,_0x33be28)[_0xa741('0xb')](function(_0x5b9529){logger['info'](_0xa741('0xc'),_0x9b6033,'request\x20sent');logger[_0xa741('0xd')](_0xa741('0xe'),_0x9b6033,_0xa741('0xf'),JSON[_0xa741('0x10')](_0x5b9529));if(_0x5b9529[_0xa741('0x11')]){if(_0x5b9529['error'][_0xa741('0x12')]===0x1f4){logger[_0xa741('0x11')]('ZendeskAccount,\x20%s,\x20%s',_0x9b6033,_0x5b9529['error'][_0xa741('0x13')]);return _0x183e10(_0x5b9529[_0xa741('0x11')]['message']);}logger[_0xa741('0x11')]('ZendeskAccount,\x20%s,\x20%s',_0x9b6033,_0x5b9529[_0xa741('0x11')][_0xa741('0x13')]);return _0x1e9c51(_0x5b9529[_0xa741('0x11')][_0xa741('0x13')]);}else{logger[_0xa741('0x14')]('ZendeskAccount,\x20%s,\x20%s',_0x9b6033,_0xa741('0xf'));_0x1e9c51(_0x5b9529['result'][_0xa741('0x13')]);}})[_0xa741('0x15')](function(_0xae3701){logger[_0xa741('0x11')]('ZendeskAccount,\x20%s,\x20%s',_0x9b6033,_0xae3701);_0x183e10(_0xae3701);});});}exports[_0xa741('0x16')]=function(_0x53e035){var _0x547879=this;return new Promise(function(_0x46ae68,_0x13ebfe){return db[_0xa741('0x17')]['findAll']({'raw':_0x53e035[_0xa741('0x18')]?_0x53e035[_0xa741('0x18')][_0xa741('0x19')]===undefined?!![]:![]:!![],'where':_0x53e035[_0xa741('0x18')]?_0x53e035[_0xa741('0x18')]['where']||null:null,'attributes':_0x53e035[_0xa741('0x18')]?_0x53e035['options'][_0xa741('0x1a')]||null:null,'limit':_0x53e035[_0xa741('0x18')]?_0x53e035['options'][_0xa741('0x1b')]||null:null,'include':_0x53e035[_0xa741('0x18')]?_0x53e035[_0xa741('0x18')][_0xa741('0x1c')]?_[_0xa741('0x1d')](_0x53e035[_0xa741('0x18')][_0xa741('0x1c')],function(_0x1b7b55){return{'model':db[_0x1b7b55[_0xa741('0x1e')]],'as':_0x1b7b55['as'],'attributes':_0x1b7b55['attributes'],'include':_0x1b7b55[_0xa741('0x1c')]?_[_0xa741('0x1d')](_0x1b7b55[_0xa741('0x1c')],function(_0x123ef0){return{'model':db[_0x123ef0[_0xa741('0x1e')]],'as':_0x123ef0['as'],'attributes':_0x123ef0[_0xa741('0x1a')],'include':_0x123ef0[_0xa741('0x1c')]?_[_0xa741('0x1d')](_0x123ef0[_0xa741('0x1c')],function(_0x2a75bc){return{'model':db[_0x2a75bc[_0xa741('0x1e')]],'as':_0x2a75bc['as'],'attributes':_0x2a75bc[_0xa741('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xa741('0xb')](function(_0x15829b){logger[_0xa741('0x14')](_0xa741('0x16'),_0x53e035);logger[_0xa741('0xd')]('GetZendeskAccount',_0x53e035,JSON['stringify'](_0x15829b));_0x46ae68(_0x15829b);})[_0xa741('0x15')](function(_0x5489c6){logger[_0xa741('0x11')](_0xa741('0x16'),_0x5489c6[_0xa741('0x13')],_0x53e035);_0x13ebfe(_0x547879[_0xa741('0x11')](0x1f4,_0x5489c6[_0xa741('0x13')]));});});};exports[_0xa741('0x1f')]=function(_0x3cb3d7){var _0x139460=this;return new Promise(function(_0x421d35,_0x27721e){return db[_0xa741('0x17')][_0xa741('0x20')]({'raw':_0x3cb3d7['options']?_0x3cb3d7[_0xa741('0x18')][_0xa741('0x19')]===undefined?!![]:![]:!![],'where':_0x3cb3d7[_0xa741('0x18')]?_0x3cb3d7[_0xa741('0x18')][_0xa741('0x21')]||null:null,'attributes':_0x3cb3d7[_0xa741('0x18')]?_0x3cb3d7[_0xa741('0x18')]['attributes']||null:null,'include':_0x3cb3d7[_0xa741('0x18')]?_0x3cb3d7[_0xa741('0x18')][_0xa741('0x1c')]?_[_0xa741('0x1d')](_0x3cb3d7[_0xa741('0x18')][_0xa741('0x1c')],function(_0x1db9e1){return{'model':db[_0x1db9e1['model']],'as':_0x1db9e1['as'],'attributes':_0x1db9e1[_0xa741('0x1a')],'include':_0x1db9e1[_0xa741('0x1c')]?_['map'](_0x1db9e1[_0xa741('0x1c')],function(_0x2bf6b2){return{'model':db[_0x2bf6b2[_0xa741('0x1e')]],'as':_0x2bf6b2['as'],'attributes':_0x2bf6b2['attributes'],'include':_0x2bf6b2[_0xa741('0x1c')]?_['map'](_0x2bf6b2[_0xa741('0x1c')],function(_0x1eb581){return{'model':db[_0x1eb581[_0xa741('0x1e')]],'as':_0x1eb581['as'],'attributes':_0x1eb581[_0xa741('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xa741('0xb')](function(_0x489178){logger['info']('ShowZendeskAccount',_0x3cb3d7);logger[_0xa741('0xd')](_0xa741('0x1f'),_0x3cb3d7,JSON[_0xa741('0x10')](_0x489178));_0x421d35(_0x489178);})[_0xa741('0x15')](function(_0x4dcd00){logger[_0xa741('0x11')](_0xa741('0x1f'),_0x4dcd00[_0xa741('0x13')],_0x3cb3d7);_0x27721e(_0x139460[_0xa741('0x11')](0x1f4,_0x4dcd00[_0xa741('0x13')]));});});};
\ No newline at end of file
+var _0x0c9d=['catch','GetZendeskAccount','ZendeskAccount','findAll','options','raw','where','attributes','include','map','model','ShowZendeskAccount','find','lodash','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','client','then','info','ZendeskAccount,\x20%s,\x20%s','request\x20sent','debug','ZendeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result'];(function(_0x24cd7e,_0x11d3e6){var _0x29be41=function(_0x174d26){while(--_0x174d26){_0x24cd7e['push'](_0x24cd7e['shift']());}};_0x29be41(++_0x11d3e6);}(_0x0c9d,0x1ad));var _0xd0c9=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0c9d[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xd0c9('0x0'));var util=require('util');var moment=require(_0xd0c9('0x1'));var BPromise=require(_0xd0c9('0x2'));var rs=require(_0xd0c9('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xd0c9('0x4'));var logger=require(_0xd0c9('0x5'))(_0xd0c9('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xd0c9('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x46f6f9,_0x2743c5,_0x5bc6c5){return new BPromise(function(_0x203310,_0x5b74d8){return client['request'](_0x46f6f9,_0x5bc6c5)[_0xd0c9('0x8')](function(_0x2390a3){logger[_0xd0c9('0x9')](_0xd0c9('0xa'),_0x2743c5,_0xd0c9('0xb'));logger[_0xd0c9('0xc')](_0xd0c9('0xd'),_0x2743c5,_0xd0c9('0xb'),JSON[_0xd0c9('0xe')](_0x2390a3));if(_0x2390a3[_0xd0c9('0xf')]){if(_0x2390a3[_0xd0c9('0xf')][_0xd0c9('0x10')]===0x1f4){logger[_0xd0c9('0xf')](_0xd0c9('0xa'),_0x2743c5,_0x2390a3['error'][_0xd0c9('0x11')]);return _0x5b74d8(_0x2390a3[_0xd0c9('0xf')][_0xd0c9('0x11')]);}logger['error']('ZendeskAccount,\x20%s,\x20%s',_0x2743c5,_0x2390a3[_0xd0c9('0xf')][_0xd0c9('0x11')]);return _0x203310(_0x2390a3[_0xd0c9('0xf')]['message']);}else{logger[_0xd0c9('0x9')](_0xd0c9('0xa'),_0x2743c5,_0xd0c9('0xb'));_0x203310(_0x2390a3[_0xd0c9('0x12')]['message']);}})[_0xd0c9('0x13')](function(_0x10b492){logger[_0xd0c9('0xf')]('ZendeskAccount,\x20%s,\x20%s',_0x2743c5,_0x10b492);_0x5b74d8(_0x10b492);});});}exports[_0xd0c9('0x14')]=function(_0xe06cbe){var _0x5ee7d1=this;return new Promise(function(_0x12b21e,_0x5ba486){return db[_0xd0c9('0x15')][_0xd0c9('0x16')]({'raw':_0xe06cbe[_0xd0c9('0x17')]?_0xe06cbe[_0xd0c9('0x17')][_0xd0c9('0x18')]===undefined?!![]:![]:!![],'where':_0xe06cbe[_0xd0c9('0x17')]?_0xe06cbe[_0xd0c9('0x17')][_0xd0c9('0x19')]||null:null,'attributes':_0xe06cbe[_0xd0c9('0x17')]?_0xe06cbe[_0xd0c9('0x17')][_0xd0c9('0x1a')]||null:null,'limit':_0xe06cbe[_0xd0c9('0x17')]?_0xe06cbe[_0xd0c9('0x17')]['limit']||null:null,'include':_0xe06cbe['options']?_0xe06cbe['options'][_0xd0c9('0x1b')]?_[_0xd0c9('0x1c')](_0xe06cbe[_0xd0c9('0x17')]['include'],function(_0x2dbf34){return{'model':db[_0x2dbf34[_0xd0c9('0x1d')]],'as':_0x2dbf34['as'],'attributes':_0x2dbf34[_0xd0c9('0x1a')],'include':_0x2dbf34[_0xd0c9('0x1b')]?_[_0xd0c9('0x1c')](_0x2dbf34[_0xd0c9('0x1b')],function(_0xba9c3d){return{'model':db[_0xba9c3d[_0xd0c9('0x1d')]],'as':_0xba9c3d['as'],'attributes':_0xba9c3d['attributes'],'include':_0xba9c3d[_0xd0c9('0x1b')]?_[_0xd0c9('0x1c')](_0xba9c3d[_0xd0c9('0x1b')],function(_0x1e6de4){return{'model':db[_0x1e6de4[_0xd0c9('0x1d')]],'as':_0x1e6de4['as'],'attributes':_0x1e6de4[_0xd0c9('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xd0c9('0x8')](function(_0x2f0691){logger[_0xd0c9('0x9')](_0xd0c9('0x14'),_0xe06cbe);logger[_0xd0c9('0xc')](_0xd0c9('0x14'),_0xe06cbe,JSON[_0xd0c9('0xe')](_0x2f0691));_0x12b21e(_0x2f0691);})[_0xd0c9('0x13')](function(_0x27b03d){logger[_0xd0c9('0xf')](_0xd0c9('0x14'),_0x27b03d[_0xd0c9('0x11')],_0xe06cbe);_0x5ba486(_0x5ee7d1[_0xd0c9('0xf')](0x1f4,_0x27b03d[_0xd0c9('0x11')]));});});};exports[_0xd0c9('0x1e')]=function(_0x2795c8){var _0x2c217a=this;return new Promise(function(_0x32c8f1,_0x27a987){return db['ZendeskAccount'][_0xd0c9('0x1f')]({'raw':_0x2795c8[_0xd0c9('0x17')]?_0x2795c8[_0xd0c9('0x17')][_0xd0c9('0x18')]===undefined?!![]:![]:!![],'where':_0x2795c8['options']?_0x2795c8['options'][_0xd0c9('0x19')]||null:null,'attributes':_0x2795c8[_0xd0c9('0x17')]?_0x2795c8[_0xd0c9('0x17')][_0xd0c9('0x1a')]||null:null,'include':_0x2795c8[_0xd0c9('0x17')]?_0x2795c8[_0xd0c9('0x17')]['include']?_[_0xd0c9('0x1c')](_0x2795c8[_0xd0c9('0x17')][_0xd0c9('0x1b')],function(_0x1083e4){return{'model':db[_0x1083e4[_0xd0c9('0x1d')]],'as':_0x1083e4['as'],'attributes':_0x1083e4[_0xd0c9('0x1a')],'include':_0x1083e4[_0xd0c9('0x1b')]?_[_0xd0c9('0x1c')](_0x1083e4[_0xd0c9('0x1b')],function(_0x56548a){return{'model':db[_0x56548a[_0xd0c9('0x1d')]],'as':_0x56548a['as'],'attributes':_0x56548a[_0xd0c9('0x1a')],'include':_0x56548a[_0xd0c9('0x1b')]?_[_0xd0c9('0x1c')](_0x56548a[_0xd0c9('0x1b')],function(_0x50bfe1){return{'model':db[_0x50bfe1[_0xd0c9('0x1d')]],'as':_0x50bfe1['as'],'attributes':_0x50bfe1[_0xd0c9('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xd0c9('0x8')](function(_0x2644f5){logger[_0xd0c9('0x9')](_0xd0c9('0x1e'),_0x2795c8);logger[_0xd0c9('0xc')](_0xd0c9('0x1e'),_0x2795c8,JSON[_0xd0c9('0xe')](_0x2644f5));_0x32c8f1(_0x2644f5);})[_0xd0c9('0x13')](function(_0x308082){logger[_0xd0c9('0xf')](_0xd0c9('0x1e'),_0x308082[_0xd0c9('0x11')],_0x2795c8);_0x27a987(_0x2c217a[_0xd0c9('0xf')](0x1f4,_0x308082[_0xd0c9('0x11')]));});});};
\ No newline at end of file