Built motion from commit (unavailable).|2.0.73
[motion2.git] / server / api / intZohoAccount / intZohoAccount.rpc.js
index f3fb20c..2d973a2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xade4=['ZohoAccount','options','raw','where','attributes','limit','map','include','model','ShowZohoAccount','find','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','request','then','ZohoAccount,\x20%s,\x20%s','request\x20sent','debug','ZohoAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','GetZohoAccount'];(function(_0x3b9e4c,_0xab997d){var _0x27ee16=function(_0x320208){while(--_0x320208){_0x3b9e4c['push'](_0x3b9e4c['shift']());}};_0x27ee16(++_0xab997d);}(_0xade4,0x18c));var _0x4ade=function(_0x27a42c,_0x3ea0d3){_0x27a42c=_0x27a42c-0x0;var _0x14ecec=_0xade4[_0x27a42c];return _0x14ecec;};'use strict';var _=require(_0x4ade('0x0'));var util=require(_0x4ade('0x1'));var moment=require('moment');var BPromise=require(_0x4ade('0x2'));var rs=require(_0x4ade('0x3'));var fs=require('fs');var db=require(_0x4ade('0x4'))['db'];var utils=require(_0x4ade('0x5'));var logger=require('../../config/logger')(_0x4ade('0x6'));var config=require('../../config/environment');var jayson=require(_0x4ade('0x7'));var client=jayson[_0x4ade('0x8')][_0x4ade('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3ea6a1,_0x59ed3d,_0x503e72){return new BPromise(function(_0x37ea94,_0x1f7950){return client[_0x4ade('0xa')](_0x3ea6a1,_0x503e72)[_0x4ade('0xb')](function(_0xe9685){logger['info'](_0x4ade('0xc'),_0x59ed3d,_0x4ade('0xd'));logger[_0x4ade('0xe')](_0x4ade('0xf'),_0x59ed3d,_0x4ade('0xd'),JSON[_0x4ade('0x10')](_0xe9685));if(_0xe9685[_0x4ade('0x11')]){if(_0xe9685[_0x4ade('0x11')][_0x4ade('0x12')]===0x1f4){logger['error'](_0x4ade('0xc'),_0x59ed3d,_0xe9685[_0x4ade('0x11')][_0x4ade('0x13')]);return _0x1f7950(_0xe9685['error'][_0x4ade('0x13')]);}logger['error'](_0x4ade('0xc'),_0x59ed3d,_0xe9685[_0x4ade('0x11')][_0x4ade('0x13')]);return _0x37ea94(_0xe9685[_0x4ade('0x11')]['message']);}else{logger[_0x4ade('0x14')](_0x4ade('0xc'),_0x59ed3d,_0x4ade('0xd'));_0x37ea94(_0xe9685[_0x4ade('0x15')][_0x4ade('0x13')]);}})[_0x4ade('0x16')](function(_0x20f951){logger[_0x4ade('0x11')](_0x4ade('0xc'),_0x59ed3d,_0x20f951);_0x1f7950(_0x20f951);});});}exports[_0x4ade('0x17')]=function(_0x26cffa){var _0x3be681=this;return new Promise(function(_0x10141d,_0x4ac4c4){return db[_0x4ade('0x18')]['findAll']({'raw':_0x26cffa[_0x4ade('0x19')]?_0x26cffa[_0x4ade('0x19')][_0x4ade('0x1a')]===undefined?!![]:![]:!![],'where':_0x26cffa[_0x4ade('0x19')]?_0x26cffa[_0x4ade('0x19')][_0x4ade('0x1b')]||null:null,'attributes':_0x26cffa['options']?_0x26cffa[_0x4ade('0x19')][_0x4ade('0x1c')]||null:null,'limit':_0x26cffa['options']?_0x26cffa[_0x4ade('0x19')][_0x4ade('0x1d')]||null:null,'include':_0x26cffa[_0x4ade('0x19')]?_0x26cffa[_0x4ade('0x19')]['include']?_[_0x4ade('0x1e')](_0x26cffa[_0x4ade('0x19')][_0x4ade('0x1f')],function(_0xf9c819){return{'model':db[_0xf9c819[_0x4ade('0x20')]],'as':_0xf9c819['as'],'attributes':_0xf9c819[_0x4ade('0x1c')],'include':_0xf9c819['include']?_[_0x4ade('0x1e')](_0xf9c819[_0x4ade('0x1f')],function(_0x63bf1e){return{'model':db[_0x63bf1e[_0x4ade('0x20')]],'as':_0x63bf1e['as'],'attributes':_0x63bf1e['attributes'],'include':_0x63bf1e[_0x4ade('0x1f')]?_['map'](_0x63bf1e[_0x4ade('0x1f')],function(_0x1277f6){return{'model':db[_0x1277f6[_0x4ade('0x20')]],'as':_0x1277f6['as'],'attributes':_0x1277f6[_0x4ade('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x45ee42){logger[_0x4ade('0x14')]('GetZohoAccount',_0x26cffa);logger[_0x4ade('0xe')](_0x4ade('0x17'),_0x26cffa,JSON[_0x4ade('0x10')](_0x45ee42));_0x10141d(_0x45ee42);})['catch'](function(_0x17a7a9){logger[_0x4ade('0x11')](_0x4ade('0x17'),_0x17a7a9[_0x4ade('0x13')],_0x26cffa);_0x4ac4c4(_0x3be681[_0x4ade('0x11')](0x1f4,_0x17a7a9[_0x4ade('0x13')]));});});};exports[_0x4ade('0x21')]=function(_0x2ed2d5){var _0x444b9e=this;return new Promise(function(_0x7d4f65,_0x2d76a2){return db[_0x4ade('0x18')][_0x4ade('0x22')]({'raw':_0x2ed2d5[_0x4ade('0x19')]?_0x2ed2d5[_0x4ade('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x2ed2d5[_0x4ade('0x19')]?_0x2ed2d5['options'][_0x4ade('0x1b')]||null:null,'attributes':_0x2ed2d5[_0x4ade('0x19')]?_0x2ed2d5['options'][_0x4ade('0x1c')]||null:null,'include':_0x2ed2d5[_0x4ade('0x19')]?_0x2ed2d5[_0x4ade('0x19')][_0x4ade('0x1f')]?_[_0x4ade('0x1e')](_0x2ed2d5['options'][_0x4ade('0x1f')],function(_0x3fbfa5){return{'model':db[_0x3fbfa5[_0x4ade('0x20')]],'as':_0x3fbfa5['as'],'attributes':_0x3fbfa5[_0x4ade('0x1c')],'include':_0x3fbfa5[_0x4ade('0x1f')]?_[_0x4ade('0x1e')](_0x3fbfa5[_0x4ade('0x1f')],function(_0x5d2977){return{'model':db[_0x5d2977[_0x4ade('0x20')]],'as':_0x5d2977['as'],'attributes':_0x5d2977[_0x4ade('0x1c')],'include':_0x5d2977['include']?_[_0x4ade('0x1e')](_0x5d2977[_0x4ade('0x1f')],function(_0x9195c1){return{'model':db[_0x9195c1[_0x4ade('0x20')]],'as':_0x9195c1['as'],'attributes':_0x9195c1[_0x4ade('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x4ade('0xb')](function(_0x55c4bf){logger[_0x4ade('0x14')]('ShowZohoAccount',_0x2ed2d5);logger[_0x4ade('0xe')](_0x4ade('0x21'),_0x2ed2d5,JSON[_0x4ade('0x10')](_0x55c4bf));_0x7d4f65(_0x55c4bf);})[_0x4ade('0x16')](function(_0x407e0b){logger[_0x4ade('0x11')](_0x4ade('0x21'),_0x407e0b['message'],_0x2ed2d5);_0x2d76a2(_0x444b9e[_0x4ade('0x11')](0x1f4,_0x407e0b[_0x4ade('0x13')]));});});};
\ No newline at end of file
+var _0x7bc9=['message','result','catch','GetZohoAccount','ZohoAccount','findAll','options','raw','where','attributes','include','map','model','then','find','ShowZohoAccount','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','info','ZohoAccount,\x20%s,\x20%s','request\x20sent','debug','ZohoAccount,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0xc1ef62,_0x11f897){var _0x5af121=function(_0xa46d8e){while(--_0xa46d8e){_0xc1ef62['push'](_0xc1ef62['shift']());}};_0x5af121(++_0x11f897);}(_0x7bc9,0x128));var _0x97bc=function(_0x3f2df6,_0x1c6a9c){_0x3f2df6=_0x3f2df6-0x0;var _0x483997=_0x7bc9[_0x3f2df6];return _0x483997;};'use strict';var _=require('lodash');var util=require(_0x97bc('0x0'));var moment=require('moment');var BPromise=require(_0x97bc('0x1'));var rs=require(_0x97bc('0x2'));var fs=require('fs');var db=require(_0x97bc('0x3'))['db'];var utils=require(_0x97bc('0x4'));var logger=require(_0x97bc('0x5'))('rpc');var config=require(_0x97bc('0x6'));var jayson=require(_0x97bc('0x7'));var client=jayson[_0x97bc('0x8')][_0x97bc('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x23ed0e,_0x18be89,_0x437f44){return new BPromise(function(_0x4799e6,_0x26f851){return client[_0x97bc('0xa')](_0x23ed0e,_0x437f44)['then'](function(_0x26d787){logger[_0x97bc('0xb')](_0x97bc('0xc'),_0x18be89,_0x97bc('0xd'));logger[_0x97bc('0xe')](_0x97bc('0xf'),_0x18be89,'request\x20sent',JSON[_0x97bc('0x10')](_0x26d787));if(_0x26d787[_0x97bc('0x11')]){if(_0x26d787[_0x97bc('0x11')][_0x97bc('0x12')]===0x1f4){logger[_0x97bc('0x11')](_0x97bc('0xc'),_0x18be89,_0x26d787[_0x97bc('0x11')]['message']);return _0x26f851(_0x26d787[_0x97bc('0x11')][_0x97bc('0x13')]);}logger[_0x97bc('0x11')](_0x97bc('0xc'),_0x18be89,_0x26d787['error'][_0x97bc('0x13')]);return _0x4799e6(_0x26d787[_0x97bc('0x11')][_0x97bc('0x13')]);}else{logger[_0x97bc('0xb')](_0x97bc('0xc'),_0x18be89,_0x97bc('0xd'));_0x4799e6(_0x26d787[_0x97bc('0x14')]['message']);}})[_0x97bc('0x15')](function(_0x2f06ca){logger[_0x97bc('0x11')](_0x97bc('0xc'),_0x18be89,_0x2f06ca);_0x26f851(_0x2f06ca);});});}exports[_0x97bc('0x16')]=function(_0x40809b){var _0x33a2fe=this;return new Promise(function(_0x48a9d2,_0x2b1de1){return db[_0x97bc('0x17')][_0x97bc('0x18')]({'raw':_0x40809b[_0x97bc('0x19')]?_0x40809b['options'][_0x97bc('0x1a')]===undefined?!![]:![]:!![],'where':_0x40809b[_0x97bc('0x19')]?_0x40809b['options'][_0x97bc('0x1b')]||null:null,'attributes':_0x40809b['options']?_0x40809b[_0x97bc('0x19')][_0x97bc('0x1c')]||null:null,'limit':_0x40809b[_0x97bc('0x19')]?_0x40809b[_0x97bc('0x19')]['limit']||null:null,'include':_0x40809b[_0x97bc('0x19')]?_0x40809b[_0x97bc('0x19')][_0x97bc('0x1d')]?_[_0x97bc('0x1e')](_0x40809b[_0x97bc('0x19')][_0x97bc('0x1d')],function(_0x13ee0d){return{'model':db[_0x13ee0d[_0x97bc('0x1f')]],'as':_0x13ee0d['as'],'attributes':_0x13ee0d['attributes'],'include':_0x13ee0d['include']?_['map'](_0x13ee0d[_0x97bc('0x1d')],function(_0x157cf8){return{'model':db[_0x157cf8['model']],'as':_0x157cf8['as'],'attributes':_0x157cf8[_0x97bc('0x1c')],'include':_0x157cf8[_0x97bc('0x1d')]?_[_0x97bc('0x1e')](_0x157cf8[_0x97bc('0x1d')],function(_0x3b74df){return{'model':db[_0x3b74df[_0x97bc('0x1f')]],'as':_0x3b74df['as'],'attributes':_0x3b74df[_0x97bc('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x97bc('0x20')](function(_0x6d3d11){logger['info'](_0x97bc('0x16'),_0x40809b);logger[_0x97bc('0xe')](_0x97bc('0x16'),_0x40809b,JSON[_0x97bc('0x10')](_0x6d3d11));_0x48a9d2(_0x6d3d11);})[_0x97bc('0x15')](function(_0x5a7b0d){logger['error'](_0x97bc('0x16'),_0x5a7b0d['message'],_0x40809b);_0x2b1de1(_0x33a2fe[_0x97bc('0x11')](0x1f4,_0x5a7b0d[_0x97bc('0x13')]));});});};exports['ShowZohoAccount']=function(_0x2a0e25){var _0x23832b=this;return new Promise(function(_0x45826e,_0x9877f8){return db[_0x97bc('0x17')][_0x97bc('0x21')]({'raw':_0x2a0e25['options']?_0x2a0e25[_0x97bc('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x2a0e25['options']?_0x2a0e25[_0x97bc('0x19')][_0x97bc('0x1b')]||null:null,'attributes':_0x2a0e25[_0x97bc('0x19')]?_0x2a0e25[_0x97bc('0x19')][_0x97bc('0x1c')]||null:null,'include':_0x2a0e25[_0x97bc('0x19')]?_0x2a0e25['options'][_0x97bc('0x1d')]?_[_0x97bc('0x1e')](_0x2a0e25[_0x97bc('0x19')]['include'],function(_0x2b61c0){return{'model':db[_0x2b61c0['model']],'as':_0x2b61c0['as'],'attributes':_0x2b61c0[_0x97bc('0x1c')],'include':_0x2b61c0['include']?_[_0x97bc('0x1e')](_0x2b61c0[_0x97bc('0x1d')],function(_0xe3ff20){return{'model':db[_0xe3ff20[_0x97bc('0x1f')]],'as':_0xe3ff20['as'],'attributes':_0xe3ff20[_0x97bc('0x1c')],'include':_0xe3ff20[_0x97bc('0x1d')]?_[_0x97bc('0x1e')](_0xe3ff20[_0x97bc('0x1d')],function(_0x54c3c0){return{'model':db[_0x54c3c0[_0x97bc('0x1f')]],'as':_0x54c3c0['as'],'attributes':_0x54c3c0[_0x97bc('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x50a963){logger['info'](_0x97bc('0x22'),_0x2a0e25);logger[_0x97bc('0xe')](_0x97bc('0x22'),_0x2a0e25,JSON[_0x97bc('0x10')](_0x50a963));_0x45826e(_0x50a963);})['catch'](function(_0x163ba2){logger[_0x97bc('0x11')](_0x97bc('0x22'),_0x163ba2[_0x97bc('0x13')],_0x2a0e25);_0x9877f8(_0x23832b[_0x97bc('0x11')](0x1f4,_0x163ba2['message']));});});};
\ No newline at end of file