Built motion from commit (unavailable).|2.4.5
[motion2.git] / server / api / intZohoAccount / intZohoAccount.rpc.js
index 813388e..42c17cd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6582=['options','raw','where','attributes','limit','include','model','map','GetZohoAccount','stringify','ShowZohoAccount','find','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','client','http','request','then','info','ZohoAccount,\x20%s,\x20%s','request\x20sent','debug','ZohoAccount,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','ZohoAccount','findAll'];(function(_0xd0a0ae,_0x239a61){var _0x4da1a4=function(_0x10554c){while(--_0x10554c){_0xd0a0ae['push'](_0xd0a0ae['shift']());}};_0x4da1a4(++_0x239a61);}(_0x6582,0x108));var _0x2658=function(_0x77fbf8,_0x31cf3f){_0x77fbf8=_0x77fbf8-0x0;var _0x2df250=_0x6582[_0x77fbf8];return _0x2df250;};'use strict';var _=require(_0x2658('0x0'));var util=require(_0x2658('0x1'));var moment=require(_0x2658('0x2'));var BPromise=require(_0x2658('0x3'));var rs=require(_0x2658('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x2658('0x5'))['db'];var utils=require(_0x2658('0x6'));var logger=require(_0x2658('0x7'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x2658('0x8')][_0x2658('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2cb94f,_0x3f53e7,_0x443df){return new BPromise(function(_0x412a9f,_0x52ef38){return client[_0x2658('0xa')](_0x2cb94f,_0x443df)[_0x2658('0xb')](function(_0x426744){logger[_0x2658('0xc')](_0x2658('0xd'),_0x3f53e7,_0x2658('0xe'));logger[_0x2658('0xf')](_0x2658('0x10'),_0x3f53e7,_0x2658('0xe'),JSON['stringify'](_0x426744));if(_0x426744[_0x2658('0x11')]){if(_0x426744['error'][_0x2658('0x12')]===0x1f4){logger[_0x2658('0x11')](_0x2658('0xd'),_0x3f53e7,_0x426744[_0x2658('0x11')][_0x2658('0x13')]);return _0x52ef38(_0x426744[_0x2658('0x11')][_0x2658('0x13')]);}logger['error'](_0x2658('0xd'),_0x3f53e7,_0x426744[_0x2658('0x11')][_0x2658('0x13')]);return _0x412a9f(_0x426744[_0x2658('0x11')][_0x2658('0x13')]);}else{logger['info'](_0x2658('0xd'),_0x3f53e7,_0x2658('0xe'));_0x412a9f(_0x426744[_0x2658('0x14')]['message']);}})[_0x2658('0x15')](function(_0x44c6d2){logger[_0x2658('0x11')](_0x2658('0xd'),_0x3f53e7,_0x44c6d2);_0x52ef38(_0x44c6d2);});});}exports['GetZohoAccount']=function(_0x4eb90d){var _0x57337e=this;return new Promise(function(_0xf4193a,_0x260fc7){return db[_0x2658('0x16')][_0x2658('0x17')]({'raw':_0x4eb90d['options']?_0x4eb90d[_0x2658('0x18')][_0x2658('0x19')]===undefined?!![]:![]:!![],'where':_0x4eb90d[_0x2658('0x18')]?_0x4eb90d[_0x2658('0x18')][_0x2658('0x1a')]||null:null,'attributes':_0x4eb90d[_0x2658('0x18')]?_0x4eb90d['options'][_0x2658('0x1b')]||null:null,'limit':_0x4eb90d['options']?_0x4eb90d['options'][_0x2658('0x1c')]||null:null,'include':_0x4eb90d[_0x2658('0x18')]?_0x4eb90d['options'][_0x2658('0x1d')]?_['map'](_0x4eb90d[_0x2658('0x18')][_0x2658('0x1d')],function(_0x44642e){return{'model':db[_0x44642e[_0x2658('0x1e')]],'as':_0x44642e['as'],'attributes':_0x44642e[_0x2658('0x1b')],'include':_0x44642e[_0x2658('0x1d')]?_[_0x2658('0x1f')](_0x44642e[_0x2658('0x1d')],function(_0x2496bf){return{'model':db[_0x2496bf[_0x2658('0x1e')]],'as':_0x2496bf['as'],'attributes':_0x2496bf['attributes'],'include':_0x2496bf[_0x2658('0x1d')]?_[_0x2658('0x1f')](_0x2496bf[_0x2658('0x1d')],function(_0x3d251e){return{'model':db[_0x3d251e[_0x2658('0x1e')]],'as':_0x3d251e['as'],'attributes':_0x3d251e[_0x2658('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1d2bf4){logger[_0x2658('0xc')](_0x2658('0x20'),_0x4eb90d);logger[_0x2658('0xf')](_0x2658('0x20'),_0x4eb90d,JSON[_0x2658('0x21')](_0x1d2bf4));_0xf4193a(_0x1d2bf4);})[_0x2658('0x15')](function(_0xb8d245){logger[_0x2658('0x11')](_0x2658('0x20'),_0xb8d245[_0x2658('0x13')],_0x4eb90d);_0x260fc7(_0x57337e[_0x2658('0x11')](0x1f4,_0xb8d245[_0x2658('0x13')]));});});};exports[_0x2658('0x22')]=function(_0x2c6172){var _0x3db87d=this;return new Promise(function(_0x89f2e2,_0xfd4eec){return db['ZohoAccount'][_0x2658('0x23')]({'raw':_0x2c6172[_0x2658('0x18')]?_0x2c6172[_0x2658('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x2c6172[_0x2658('0x18')]?_0x2c6172[_0x2658('0x18')][_0x2658('0x1a')]||null:null,'attributes':_0x2c6172['options']?_0x2c6172[_0x2658('0x18')][_0x2658('0x1b')]||null:null,'include':_0x2c6172[_0x2658('0x18')]?_0x2c6172[_0x2658('0x18')][_0x2658('0x1d')]?_[_0x2658('0x1f')](_0x2c6172[_0x2658('0x18')][_0x2658('0x1d')],function(_0xfc7d10){return{'model':db[_0xfc7d10['model']],'as':_0xfc7d10['as'],'attributes':_0xfc7d10[_0x2658('0x1b')],'include':_0xfc7d10[_0x2658('0x1d')]?_[_0x2658('0x1f')](_0xfc7d10['include'],function(_0x5d94b6){return{'model':db[_0x5d94b6['model']],'as':_0x5d94b6['as'],'attributes':_0x5d94b6[_0x2658('0x1b')],'include':_0x5d94b6[_0x2658('0x1d')]?_[_0x2658('0x1f')](_0x5d94b6[_0x2658('0x1d')],function(_0x2e1869){return{'model':db[_0x2e1869[_0x2658('0x1e')]],'as':_0x2e1869['as'],'attributes':_0x2e1869['attributes']};}):[]};}):[]};}):[]:[]})[_0x2658('0xb')](function(_0x302e36){logger[_0x2658('0xc')]('ShowZohoAccount',_0x2c6172);logger[_0x2658('0xf')](_0x2658('0x22'),_0x2c6172,JSON[_0x2658('0x21')](_0x302e36));_0x89f2e2(_0x302e36);})[_0x2658('0x15')](function(_0x481acc){logger[_0x2658('0x11')](_0x2658('0x22'),_0x481acc['message'],_0x2c6172);_0xfd4eec(_0x3db87d['error'](0x1f4,_0x481acc['message']));});});};
\ No newline at end of file
+var _0x6730=['stringify','error','code','message','info','result','catch','GetZohoAccount','findAll','options','raw','where','attributes','limit','include','map','model','ZohoAccount','find','ShowZohoAccount','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','ZohoAccount,\x20%s,\x20%s','request\x20sent','debug','ZohoAccount,\x20%s,\x20%s,\x20%s'];(function(_0x30ff7c,_0x4d51b5){var _0x5583c2=function(_0x19f954){while(--_0x19f954){_0x30ff7c['push'](_0x30ff7c['shift']());}};_0x5583c2(++_0x4d51b5);}(_0x6730,0x1ab));var _0x0673=function(_0x59d980,_0x1f2185){_0x59d980=_0x59d980-0x0;var _0x505478=_0x6730[_0x59d980];return _0x505478;};'use strict';var _=require('lodash');var util=require(_0x0673('0x0'));var moment=require(_0x0673('0x1'));var BPromise=require(_0x0673('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0673('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0673('0x4'));var logger=require(_0x0673('0x5'))(_0x0673('0x6'));var config=require(_0x0673('0x7'));var jayson=require(_0x0673('0x8'));var client=jayson[_0x0673('0x9')][_0x0673('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4a1f68,_0x2e0762,_0x3b22cb){return new BPromise(function(_0x29ae03,_0xebcf76){return client[_0x0673('0xb')](_0x4a1f68,_0x3b22cb)[_0x0673('0xc')](function(_0x25cb0f){logger['info'](_0x0673('0xd'),_0x2e0762,_0x0673('0xe'));logger[_0x0673('0xf')](_0x0673('0x10'),_0x2e0762,_0x0673('0xe'),JSON[_0x0673('0x11')](_0x25cb0f));if(_0x25cb0f[_0x0673('0x12')]){if(_0x25cb0f[_0x0673('0x12')][_0x0673('0x13')]===0x1f4){logger[_0x0673('0x12')](_0x0673('0xd'),_0x2e0762,_0x25cb0f[_0x0673('0x12')]['message']);return _0xebcf76(_0x25cb0f[_0x0673('0x12')][_0x0673('0x14')]);}logger[_0x0673('0x12')](_0x0673('0xd'),_0x2e0762,_0x25cb0f[_0x0673('0x12')][_0x0673('0x14')]);return _0x29ae03(_0x25cb0f['error'][_0x0673('0x14')]);}else{logger[_0x0673('0x15')](_0x0673('0xd'),_0x2e0762,_0x0673('0xe'));_0x29ae03(_0x25cb0f[_0x0673('0x16')][_0x0673('0x14')]);}})[_0x0673('0x17')](function(_0xb33ee7){logger[_0x0673('0x12')]('ZohoAccount,\x20%s,\x20%s',_0x2e0762,_0xb33ee7);_0xebcf76(_0xb33ee7);});});}exports[_0x0673('0x18')]=function(_0x106f29){var _0x334b4c=this;return new Promise(function(_0xa3e936,_0x21ea5c){return db['ZohoAccount'][_0x0673('0x19')]({'raw':_0x106f29[_0x0673('0x1a')]?_0x106f29[_0x0673('0x1a')][_0x0673('0x1b')]===undefined?!![]:![]:!![],'where':_0x106f29[_0x0673('0x1a')]?_0x106f29[_0x0673('0x1a')][_0x0673('0x1c')]||null:null,'attributes':_0x106f29[_0x0673('0x1a')]?_0x106f29[_0x0673('0x1a')][_0x0673('0x1d')]||null:null,'limit':_0x106f29[_0x0673('0x1a')]?_0x106f29[_0x0673('0x1a')][_0x0673('0x1e')]||null:null,'include':_0x106f29['options']?_0x106f29[_0x0673('0x1a')][_0x0673('0x1f')]?_[_0x0673('0x20')](_0x106f29['options'][_0x0673('0x1f')],function(_0x43377a){return{'model':db[_0x43377a['model']],'as':_0x43377a['as'],'attributes':_0x43377a['attributes'],'include':_0x43377a[_0x0673('0x1f')]?_[_0x0673('0x20')](_0x43377a[_0x0673('0x1f')],function(_0x5b1b37){return{'model':db[_0x5b1b37[_0x0673('0x21')]],'as':_0x5b1b37['as'],'attributes':_0x5b1b37[_0x0673('0x1d')],'include':_0x5b1b37[_0x0673('0x1f')]?_[_0x0673('0x20')](_0x5b1b37[_0x0673('0x1f')],function(_0x956383){return{'model':db[_0x956383[_0x0673('0x21')]],'as':_0x956383['as'],'attributes':_0x956383[_0x0673('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x0673('0xc')](function(_0x4ab6bc){logger[_0x0673('0x15')](_0x0673('0x18'),_0x106f29);logger[_0x0673('0xf')](_0x0673('0x18'),_0x106f29,JSON[_0x0673('0x11')](_0x4ab6bc));_0xa3e936(_0x4ab6bc);})['catch'](function(_0x197064){logger['error'](_0x0673('0x18'),_0x197064[_0x0673('0x14')],_0x106f29);_0x21ea5c(_0x334b4c[_0x0673('0x12')](0x1f4,_0x197064[_0x0673('0x14')]));});});};exports['ShowZohoAccount']=function(_0x2b38dd){var _0x11a619=this;return new Promise(function(_0x2d129a,_0x3b80e5){return db[_0x0673('0x22')][_0x0673('0x23')]({'raw':_0x2b38dd[_0x0673('0x1a')]?_0x2b38dd[_0x0673('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x2b38dd['options']?_0x2b38dd[_0x0673('0x1a')][_0x0673('0x1c')]||null:null,'attributes':_0x2b38dd[_0x0673('0x1a')]?_0x2b38dd[_0x0673('0x1a')][_0x0673('0x1d')]||null:null,'include':_0x2b38dd['options']?_0x2b38dd[_0x0673('0x1a')][_0x0673('0x1f')]?_[_0x0673('0x20')](_0x2b38dd[_0x0673('0x1a')]['include'],function(_0x58d201){return{'model':db[_0x58d201[_0x0673('0x21')]],'as':_0x58d201['as'],'attributes':_0x58d201[_0x0673('0x1d')],'include':_0x58d201[_0x0673('0x1f')]?_[_0x0673('0x20')](_0x58d201[_0x0673('0x1f')],function(_0x33f156){return{'model':db[_0x33f156[_0x0673('0x21')]],'as':_0x33f156['as'],'attributes':_0x33f156[_0x0673('0x1d')],'include':_0x33f156[_0x0673('0x1f')]?_['map'](_0x33f156[_0x0673('0x1f')],function(_0x16cf9){return{'model':db[_0x16cf9[_0x0673('0x21')]],'as':_0x16cf9['as'],'attributes':_0x16cf9['attributes']};}):[]};}):[]};}):[]:[]})[_0x0673('0xc')](function(_0x69bca0){logger[_0x0673('0x15')](_0x0673('0x24'),_0x2b38dd);logger['debug'](_0x0673('0x24'),_0x2b38dd,JSON[_0x0673('0x11')](_0x69bca0));_0x2d129a(_0x69bca0);})[_0x0673('0x17')](function(_0x5080ae){logger[_0x0673('0x12')]('ShowZohoAccount',_0x5080ae[_0x0673('0x14')],_0x2b38dd);_0x3b80e5(_0x11a619[_0x0673('0x12')](0x1f4,_0x5080ae[_0x0673('0x14')]));});});};
\ No newline at end of file