Built motion from commit (unavailable).|2.4.12
[motion2.git] / server / api / intZohoAccount / intZohoAccount.rpc.js
index af79f13..4164b05 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7046=['ZohoAccount','findAll','options','raw','where','attributes','limit','include','map','model','ShowZohoAccount','find','lodash','util','moment','randomstring','../../config/utils','../../config/logger','../../config/environment','client','http','request','then','info','ZohoAccount,\x20%s,\x20%s','request\x20sent','debug','ZohoAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','GetZohoAccount'];(function(_0xee6a84,_0x56fc6c){var _0x22908e=function(_0x408adb){while(--_0x408adb){_0xee6a84['push'](_0xee6a84['shift']());}};_0x22908e(++_0x56fc6c);}(_0x7046,0x1c6));var _0x6704=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x7046[_0x2641f9];return _0x585741;};'use strict';var _=require(_0x6704('0x0'));var util=require(_0x6704('0x1'));var moment=require(_0x6704('0x2'));var BPromise=require('bluebird');var rs=require(_0x6704('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x6704('0x4'));var logger=require(_0x6704('0x5'))('rpc');var config=require(_0x6704('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x6704('0x7')][_0x6704('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x14bdde,_0x299e72,_0x5e73d7){return new BPromise(function(_0x2a6f8b,_0x38d8c3){return client[_0x6704('0x9')](_0x14bdde,_0x5e73d7)[_0x6704('0xa')](function(_0x4f4cb3){logger[_0x6704('0xb')](_0x6704('0xc'),_0x299e72,_0x6704('0xd'));logger[_0x6704('0xe')](_0x6704('0xf'),_0x299e72,_0x6704('0xd'),JSON[_0x6704('0x10')](_0x4f4cb3));if(_0x4f4cb3['error']){if(_0x4f4cb3[_0x6704('0x11')][_0x6704('0x12')]===0x1f4){logger[_0x6704('0x11')](_0x6704('0xc'),_0x299e72,_0x4f4cb3['error']['message']);return _0x38d8c3(_0x4f4cb3['error']['message']);}logger[_0x6704('0x11')]('ZohoAccount,\x20%s,\x20%s',_0x299e72,_0x4f4cb3[_0x6704('0x11')][_0x6704('0x13')]);return _0x2a6f8b(_0x4f4cb3[_0x6704('0x11')][_0x6704('0x13')]);}else{logger[_0x6704('0xb')](_0x6704('0xc'),_0x299e72,_0x6704('0xd'));_0x2a6f8b(_0x4f4cb3['result'][_0x6704('0x13')]);}})[_0x6704('0x14')](function(_0x457df4){logger[_0x6704('0x11')](_0x6704('0xc'),_0x299e72,_0x457df4);_0x38d8c3(_0x457df4);});});}exports[_0x6704('0x15')]=function(_0x2cadac){var _0x530c3c=this;return new Promise(function(_0x1d85db,_0x99fa54){return db[_0x6704('0x16')][_0x6704('0x17')]({'raw':_0x2cadac['options']?_0x2cadac[_0x6704('0x18')][_0x6704('0x19')]===undefined?!![]:![]:!![],'where':_0x2cadac[_0x6704('0x18')]?_0x2cadac[_0x6704('0x18')][_0x6704('0x1a')]||null:null,'attributes':_0x2cadac[_0x6704('0x18')]?_0x2cadac[_0x6704('0x18')][_0x6704('0x1b')]||null:null,'limit':_0x2cadac[_0x6704('0x18')]?_0x2cadac['options'][_0x6704('0x1c')]||null:null,'include':_0x2cadac[_0x6704('0x18')]?_0x2cadac[_0x6704('0x18')][_0x6704('0x1d')]?_[_0x6704('0x1e')](_0x2cadac[_0x6704('0x18')][_0x6704('0x1d')],function(_0x451d03){return{'model':db[_0x451d03[_0x6704('0x1f')]],'as':_0x451d03['as'],'attributes':_0x451d03[_0x6704('0x1b')],'include':_0x451d03['include']?_[_0x6704('0x1e')](_0x451d03['include'],function(_0x3dce80){return{'model':db[_0x3dce80[_0x6704('0x1f')]],'as':_0x3dce80['as'],'attributes':_0x3dce80['attributes'],'include':_0x3dce80[_0x6704('0x1d')]?_[_0x6704('0x1e')](_0x3dce80[_0x6704('0x1d')],function(_0x186d0a){return{'model':db[_0x186d0a['model']],'as':_0x186d0a['as'],'attributes':_0x186d0a['attributes']};}):[]};}):[]};}):[]:[]})[_0x6704('0xa')](function(_0x26a0a7){logger[_0x6704('0xb')]('GetZohoAccount',_0x2cadac);logger[_0x6704('0xe')](_0x6704('0x15'),_0x2cadac,JSON[_0x6704('0x10')](_0x26a0a7));_0x1d85db(_0x26a0a7);})[_0x6704('0x14')](function(_0x2aa52f){logger['error'](_0x6704('0x15'),_0x2aa52f[_0x6704('0x13')],_0x2cadac);_0x99fa54(_0x530c3c[_0x6704('0x11')](0x1f4,_0x2aa52f[_0x6704('0x13')]));});});};exports[_0x6704('0x20')]=function(_0x46146d){var _0x1aac66=this;return new Promise(function(_0x3f9121,_0x5dadca){return db[_0x6704('0x16')][_0x6704('0x21')]({'raw':_0x46146d['options']?_0x46146d[_0x6704('0x18')][_0x6704('0x19')]===undefined?!![]:![]:!![],'where':_0x46146d[_0x6704('0x18')]?_0x46146d[_0x6704('0x18')][_0x6704('0x1a')]||null:null,'attributes':_0x46146d[_0x6704('0x18')]?_0x46146d['options']['attributes']||null:null,'include':_0x46146d[_0x6704('0x18')]?_0x46146d[_0x6704('0x18')][_0x6704('0x1d')]?_[_0x6704('0x1e')](_0x46146d[_0x6704('0x18')][_0x6704('0x1d')],function(_0x439b8e){return{'model':db[_0x439b8e[_0x6704('0x1f')]],'as':_0x439b8e['as'],'attributes':_0x439b8e[_0x6704('0x1b')],'include':_0x439b8e[_0x6704('0x1d')]?_[_0x6704('0x1e')](_0x439b8e[_0x6704('0x1d')],function(_0x225861){return{'model':db[_0x225861[_0x6704('0x1f')]],'as':_0x225861['as'],'attributes':_0x225861[_0x6704('0x1b')],'include':_0x225861[_0x6704('0x1d')]?_['map'](_0x225861[_0x6704('0x1d')],function(_0x3dceef){return{'model':db[_0x3dceef[_0x6704('0x1f')]],'as':_0x3dceef['as'],'attributes':_0x3dceef[_0x6704('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x6704('0xa')](function(_0x5d3103){logger[_0x6704('0xb')](_0x6704('0x20'),_0x46146d);logger[_0x6704('0xe')](_0x6704('0x20'),_0x46146d,JSON[_0x6704('0x10')](_0x5d3103));_0x3f9121(_0x5d3103);})[_0x6704('0x14')](function(_0x3fc1fc){logger[_0x6704('0x11')]('ShowZohoAccount',_0x3fc1fc[_0x6704('0x13')],_0x46146d);_0x5dadca(_0x1aac66[_0x6704('0x11')](0x1f4,_0x3fc1fc[_0x6704('0x13')]));});});};
\ No newline at end of file
+var _0x7079=['stringify','error','code','message','result','catch','findAll','options','where','limit','include','model','attributes','map','GetZohoAccount','debug','ShowZohoAccount','ZohoAccount','raw','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','request','then','info','ZohoAccount,\x20%s,\x20%s','request\x20sent'];(function(_0x4a91b4,_0x1d054f){var _0x431bf2=function(_0x36f243){while(--_0x36f243){_0x4a91b4['push'](_0x4a91b4['shift']());}};_0x431bf2(++_0x1d054f);}(_0x7079,0x14e));var _0x9707=function(_0x52a3a5,_0xf2fa5b){_0x52a3a5=_0x52a3a5-0x0;var _0x117241=_0x7079[_0x52a3a5];return _0x117241;};'use strict';var _=require(_0x9707('0x0'));var util=require('util');var moment=require(_0x9707('0x1'));var BPromise=require(_0x9707('0x2'));var rs=require(_0x9707('0x3'));var fs=require('fs');var Redis=require(_0x9707('0x4'));var db=require(_0x9707('0x5'))['db'];var utils=require(_0x9707('0x6'));var logger=require(_0x9707('0x7'))(_0x9707('0x8'));var config=require('../../config/environment');var jayson=require(_0x9707('0x9'));var client=jayson[_0x9707('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3d26f2,_0x4ac88c,_0x557ed9){return new BPromise(function(_0x1e0c56,_0x489e8a){return client[_0x9707('0xb')](_0x3d26f2,_0x557ed9)[_0x9707('0xc')](function(_0x45da54){logger[_0x9707('0xd')](_0x9707('0xe'),_0x4ac88c,'request\x20sent');logger['debug']('ZohoAccount,\x20%s,\x20%s,\x20%s',_0x4ac88c,_0x9707('0xf'),JSON[_0x9707('0x10')](_0x45da54));if(_0x45da54['error']){if(_0x45da54[_0x9707('0x11')][_0x9707('0x12')]===0x1f4){logger[_0x9707('0x11')](_0x9707('0xe'),_0x4ac88c,_0x45da54[_0x9707('0x11')][_0x9707('0x13')]);return _0x489e8a(_0x45da54[_0x9707('0x11')]['message']);}logger[_0x9707('0x11')](_0x9707('0xe'),_0x4ac88c,_0x45da54['error'][_0x9707('0x13')]);return _0x1e0c56(_0x45da54[_0x9707('0x11')][_0x9707('0x13')]);}else{logger['info'](_0x9707('0xe'),_0x4ac88c,_0x9707('0xf'));_0x1e0c56(_0x45da54[_0x9707('0x14')]['message']);}})[_0x9707('0x15')](function(_0x1d1b1c){logger[_0x9707('0x11')]('ZohoAccount,\x20%s,\x20%s',_0x4ac88c,_0x1d1b1c);_0x489e8a(_0x1d1b1c);});});}exports['GetZohoAccount']=function(_0x357fc1){var _0x2bce98=this;return new Promise(function(_0x13e648,_0x54f015){return db['ZohoAccount'][_0x9707('0x16')]({'raw':_0x357fc1[_0x9707('0x17')]?_0x357fc1[_0x9707('0x17')]['raw']===undefined?!![]:![]:!![],'where':_0x357fc1[_0x9707('0x17')]?_0x357fc1[_0x9707('0x17')][_0x9707('0x18')]||null:null,'attributes':_0x357fc1['options']?_0x357fc1[_0x9707('0x17')]['attributes']||null:null,'limit':_0x357fc1[_0x9707('0x17')]?_0x357fc1['options'][_0x9707('0x19')]||null:null,'include':_0x357fc1[_0x9707('0x17')]?_0x357fc1['options'][_0x9707('0x1a')]?_['map'](_0x357fc1['options'][_0x9707('0x1a')],function(_0x601f11){return{'model':db[_0x601f11[_0x9707('0x1b')]],'as':_0x601f11['as'],'attributes':_0x601f11[_0x9707('0x1c')],'include':_0x601f11[_0x9707('0x1a')]?_['map'](_0x601f11['include'],function(_0x5d44b5){return{'model':db[_0x5d44b5[_0x9707('0x1b')]],'as':_0x5d44b5['as'],'attributes':_0x5d44b5[_0x9707('0x1c')],'include':_0x5d44b5['include']?_[_0x9707('0x1d')](_0x5d44b5['include'],function(_0x3e27a9){return{'model':db[_0x3e27a9['model']],'as':_0x3e27a9['as'],'attributes':_0x3e27a9[_0x9707('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x9707('0xc')](function(_0x1f1fb7){logger[_0x9707('0xd')](_0x9707('0x1e'),_0x357fc1);logger[_0x9707('0x1f')](_0x9707('0x1e'),_0x357fc1,JSON[_0x9707('0x10')](_0x1f1fb7));_0x13e648(_0x1f1fb7);})[_0x9707('0x15')](function(_0x1d6fe2){logger[_0x9707('0x11')]('GetZohoAccount',_0x1d6fe2[_0x9707('0x13')],_0x357fc1);_0x54f015(_0x2bce98[_0x9707('0x11')](0x1f4,_0x1d6fe2['message']));});});};exports[_0x9707('0x20')]=function(_0x213f84){var _0x250583=this;return new Promise(function(_0x58a9f9,_0xb4649c){return db[_0x9707('0x21')]['find']({'raw':_0x213f84[_0x9707('0x17')]?_0x213f84[_0x9707('0x17')][_0x9707('0x22')]===undefined?!![]:![]:!![],'where':_0x213f84[_0x9707('0x17')]?_0x213f84[_0x9707('0x17')][_0x9707('0x18')]||null:null,'attributes':_0x213f84['options']?_0x213f84['options'][_0x9707('0x1c')]||null:null,'include':_0x213f84[_0x9707('0x17')]?_0x213f84[_0x9707('0x17')][_0x9707('0x1a')]?_[_0x9707('0x1d')](_0x213f84[_0x9707('0x17')][_0x9707('0x1a')],function(_0x349eb0){return{'model':db[_0x349eb0[_0x9707('0x1b')]],'as':_0x349eb0['as'],'attributes':_0x349eb0['attributes'],'include':_0x349eb0[_0x9707('0x1a')]?_[_0x9707('0x1d')](_0x349eb0['include'],function(_0x228779){return{'model':db[_0x228779[_0x9707('0x1b')]],'as':_0x228779['as'],'attributes':_0x228779['attributes'],'include':_0x228779[_0x9707('0x1a')]?_['map'](_0x228779[_0x9707('0x1a')],function(_0x203630){return{'model':db[_0x203630['model']],'as':_0x203630['as'],'attributes':_0x203630[_0x9707('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x49fd80){logger[_0x9707('0xd')]('ShowZohoAccount',_0x213f84);logger[_0x9707('0x1f')]('ShowZohoAccount',_0x213f84,JSON['stringify'](_0x49fd80));_0x58a9f9(_0x49fd80);})['catch'](function(_0x1044e9){logger[_0x9707('0x11')](_0x9707('0x20'),_0x1044e9['message'],_0x213f84);_0xb4649c(_0x250583['error'](0x1f4,_0x1044e9[_0x9707('0x13')]));});});};
\ No newline at end of file