Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / intZohoAccount / intZohoAccount.rpc.js
index f9e6208..6900b0b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x652e=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','info','ZohoAccount,\x20%s,\x20%s','request\x20sent','debug','ZohoAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','ZohoAccount','options','raw','where','attributes','limit','include','model','map','GetZohoAccount','ShowZohoAccount','find','lodash','moment','bluebird','ioredis'];(function(_0x5a1864,_0x2cd8e2){var _0x2b3370=function(_0x119ed5){while(--_0x119ed5){_0x5a1864['push'](_0x5a1864['shift']());}};_0x2b3370(++_0x2cd8e2);}(_0x652e,0xc8));var _0xe652=function(_0x16fe8f,_0xbe83f6){_0x16fe8f=_0x16fe8f-0x0;var _0x4e6a05=_0x652e[_0x16fe8f];return _0x4e6a05;};'use strict';var _=require(_0xe652('0x0'));var util=require('util');var moment=require(_0xe652('0x1'));var BPromise=require(_0xe652('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xe652('0x3'));var db=require(_0xe652('0x4'))['db'];var utils=require(_0xe652('0x5'));var logger=require(_0xe652('0x6'))(_0xe652('0x7'));var config=require(_0xe652('0x8'));var jayson=require(_0xe652('0x9'));var client=jayson[_0xe652('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2149ba,_0x57513f,_0x33b189){return new BPromise(function(_0x4c35f4,_0x332b07){return client['request'](_0x2149ba,_0x33b189)[_0xe652('0xb')](function(_0x370199){logger[_0xe652('0xc')](_0xe652('0xd'),_0x57513f,_0xe652('0xe'));logger[_0xe652('0xf')](_0xe652('0x10'),_0x57513f,_0xe652('0xe'),JSON[_0xe652('0x11')](_0x370199));if(_0x370199[_0xe652('0x12')]){if(_0x370199[_0xe652('0x12')]['code']===0x1f4){logger[_0xe652('0x12')]('ZohoAccount,\x20%s,\x20%s',_0x57513f,_0x370199[_0xe652('0x12')]['message']);return _0x332b07(_0x370199[_0xe652('0x12')][_0xe652('0x13')]);}logger[_0xe652('0x12')](_0xe652('0xd'),_0x57513f,_0x370199[_0xe652('0x12')][_0xe652('0x13')]);return _0x4c35f4(_0x370199[_0xe652('0x12')][_0xe652('0x13')]);}else{logger['info'](_0xe652('0xd'),_0x57513f,_0xe652('0xe'));_0x4c35f4(_0x370199[_0xe652('0x14')][_0xe652('0x13')]);}})[_0xe652('0x15')](function(_0xacd626){logger['error'](_0xe652('0xd'),_0x57513f,_0xacd626);_0x332b07(_0xacd626);});});}exports['GetZohoAccount']=function(_0x3e7778){var _0x1ada85=this;return new Promise(function(_0x4ea040,_0x1cecec){return db[_0xe652('0x16')]['findAll']({'raw':_0x3e7778[_0xe652('0x17')]?_0x3e7778[_0xe652('0x17')][_0xe652('0x18')]===undefined?!![]:![]:!![],'where':_0x3e7778['options']?_0x3e7778[_0xe652('0x17')][_0xe652('0x19')]||null:null,'attributes':_0x3e7778[_0xe652('0x17')]?_0x3e7778[_0xe652('0x17')][_0xe652('0x1a')]||null:null,'limit':_0x3e7778[_0xe652('0x17')]?_0x3e7778[_0xe652('0x17')][_0xe652('0x1b')]||null:null,'include':_0x3e7778[_0xe652('0x17')]?_0x3e7778[_0xe652('0x17')][_0xe652('0x1c')]?_['map'](_0x3e7778[_0xe652('0x17')][_0xe652('0x1c')],function(_0xb5d89b){return{'model':db[_0xb5d89b[_0xe652('0x1d')]],'as':_0xb5d89b['as'],'attributes':_0xb5d89b[_0xe652('0x1a')],'include':_0xb5d89b[_0xe652('0x1c')]?_[_0xe652('0x1e')](_0xb5d89b[_0xe652('0x1c')],function(_0x4ef434){return{'model':db[_0x4ef434[_0xe652('0x1d')]],'as':_0x4ef434['as'],'attributes':_0x4ef434[_0xe652('0x1a')],'include':_0x4ef434[_0xe652('0x1c')]?_[_0xe652('0x1e')](_0x4ef434[_0xe652('0x1c')],function(_0x2bb42c){return{'model':db[_0x2bb42c[_0xe652('0x1d')]],'as':_0x2bb42c['as'],'attributes':_0x2bb42c[_0xe652('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5f9376){logger['info'](_0xe652('0x1f'),_0x3e7778);logger['debug'](_0xe652('0x1f'),_0x3e7778,JSON[_0xe652('0x11')](_0x5f9376));_0x4ea040(_0x5f9376);})[_0xe652('0x15')](function(_0x778c6d){logger[_0xe652('0x12')]('GetZohoAccount',_0x778c6d['message'],_0x3e7778);_0x1cecec(_0x1ada85[_0xe652('0x12')](0x1f4,_0x778c6d[_0xe652('0x13')]));});});};exports[_0xe652('0x20')]=function(_0x364bdb){var _0x267d87=this;return new Promise(function(_0x68e002,_0x1d536c){return db['ZohoAccount'][_0xe652('0x21')]({'raw':_0x364bdb[_0xe652('0x17')]?_0x364bdb[_0xe652('0x17')][_0xe652('0x18')]===undefined?!![]:![]:!![],'where':_0x364bdb[_0xe652('0x17')]?_0x364bdb[_0xe652('0x17')][_0xe652('0x19')]||null:null,'attributes':_0x364bdb['options']?_0x364bdb[_0xe652('0x17')][_0xe652('0x1a')]||null:null,'include':_0x364bdb[_0xe652('0x17')]?_0x364bdb[_0xe652('0x17')][_0xe652('0x1c')]?_['map'](_0x364bdb[_0xe652('0x17')][_0xe652('0x1c')],function(_0x210ffa){return{'model':db[_0x210ffa['model']],'as':_0x210ffa['as'],'attributes':_0x210ffa['attributes'],'include':_0x210ffa[_0xe652('0x1c')]?_[_0xe652('0x1e')](_0x210ffa['include'],function(_0x4c362b){return{'model':db[_0x4c362b[_0xe652('0x1d')]],'as':_0x4c362b['as'],'attributes':_0x4c362b[_0xe652('0x1a')],'include':_0x4c362b[_0xe652('0x1c')]?_[_0xe652('0x1e')](_0x4c362b[_0xe652('0x1c')],function(_0x5498aa){return{'model':db[_0x5498aa[_0xe652('0x1d')]],'as':_0x5498aa['as'],'attributes':_0x5498aa['attributes']};}):[]};}):[]};}):[]:[]})[_0xe652('0xb')](function(_0x415c61){logger[_0xe652('0xc')](_0xe652('0x20'),_0x364bdb);logger[_0xe652('0xf')]('ShowZohoAccount',_0x364bdb,JSON[_0xe652('0x11')](_0x415c61));_0x68e002(_0x415c61);})['catch'](function(_0x31bb90){logger[_0xe652('0x12')]('ShowZohoAccount',_0x31bb90['message'],_0x364bdb);_0x1d536c(_0x267d87[_0xe652('0x12')](0x1f4,_0x31bb90[_0xe652('0x13')]));});});};
\ No newline at end of file
+var _0x53aa=['stringify','error','code','message','info','catch','GetZohoAccount','ZohoAccount','findAll','options','raw','limit','include','map','model','attributes','then','ShowZohoAccount','where','lodash','util','moment','bluebird','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','ZohoAccount,\x20%s,\x20%s','request\x20sent','debug','ZohoAccount,\x20%s,\x20%s,\x20%s'];(function(_0x2afbb0,_0x44f16d){var _0x411ff2=function(_0x5edd7e){while(--_0x5edd7e){_0x2afbb0['push'](_0x2afbb0['shift']());}};_0x411ff2(++_0x44f16d);}(_0x53aa,0x167));var _0xa53a=function(_0x47fd36,_0x41535d){_0x47fd36=_0x47fd36-0x0;var _0x21a0fc=_0x53aa[_0x47fd36];return _0x21a0fc;};'use strict';var _=require(_0xa53a('0x0'));var util=require(_0xa53a('0x1'));var moment=require(_0xa53a('0x2'));var BPromise=require(_0xa53a('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa53a('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xa53a('0x5'))(_0xa53a('0x6'));var config=require(_0xa53a('0x7'));var jayson=require(_0xa53a('0x8'));var client=jayson[_0xa53a('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2b48a4,_0x92251a,_0x5988ec){return new BPromise(function(_0x3a7fcf,_0x4b6a89){return client[_0xa53a('0xa')](_0x2b48a4,_0x5988ec)['then'](function(_0x43e1e7){logger['info'](_0xa53a('0xb'),_0x92251a,_0xa53a('0xc'));logger[_0xa53a('0xd')](_0xa53a('0xe'),_0x92251a,_0xa53a('0xc'),JSON[_0xa53a('0xf')](_0x43e1e7));if(_0x43e1e7[_0xa53a('0x10')]){if(_0x43e1e7[_0xa53a('0x10')][_0xa53a('0x11')]===0x1f4){logger['error'](_0xa53a('0xb'),_0x92251a,_0x43e1e7['error'][_0xa53a('0x12')]);return _0x4b6a89(_0x43e1e7[_0xa53a('0x10')][_0xa53a('0x12')]);}logger[_0xa53a('0x10')](_0xa53a('0xb'),_0x92251a,_0x43e1e7[_0xa53a('0x10')][_0xa53a('0x12')]);return _0x3a7fcf(_0x43e1e7[_0xa53a('0x10')][_0xa53a('0x12')]);}else{logger[_0xa53a('0x13')](_0xa53a('0xb'),_0x92251a,_0xa53a('0xc'));_0x3a7fcf(_0x43e1e7['result'][_0xa53a('0x12')]);}})[_0xa53a('0x14')](function(_0x53fb56){logger[_0xa53a('0x10')](_0xa53a('0xb'),_0x92251a,_0x53fb56);_0x4b6a89(_0x53fb56);});});}exports[_0xa53a('0x15')]=function(_0xf61650){var _0x2832ac=this;return new Promise(function(_0x379a0b,_0x2fe3c8){return db[_0xa53a('0x16')][_0xa53a('0x17')]({'raw':_0xf61650[_0xa53a('0x18')]?_0xf61650[_0xa53a('0x18')][_0xa53a('0x19')]===undefined?!![]:![]:!![],'where':_0xf61650[_0xa53a('0x18')]?_0xf61650[_0xa53a('0x18')]['where']||null:null,'attributes':_0xf61650[_0xa53a('0x18')]?_0xf61650[_0xa53a('0x18')]['attributes']||null:null,'limit':_0xf61650[_0xa53a('0x18')]?_0xf61650['options'][_0xa53a('0x1a')]||null:null,'include':_0xf61650[_0xa53a('0x18')]?_0xf61650[_0xa53a('0x18')][_0xa53a('0x1b')]?_[_0xa53a('0x1c')](_0xf61650[_0xa53a('0x18')]['include'],function(_0x138a10){return{'model':db[_0x138a10[_0xa53a('0x1d')]],'as':_0x138a10['as'],'attributes':_0x138a10['attributes'],'include':_0x138a10[_0xa53a('0x1b')]?_[_0xa53a('0x1c')](_0x138a10[_0xa53a('0x1b')],function(_0x1d9466){return{'model':db[_0x1d9466[_0xa53a('0x1d')]],'as':_0x1d9466['as'],'attributes':_0x1d9466[_0xa53a('0x1e')],'include':_0x1d9466[_0xa53a('0x1b')]?_['map'](_0x1d9466['include'],function(_0x38161c){return{'model':db[_0x38161c[_0xa53a('0x1d')]],'as':_0x38161c['as'],'attributes':_0x38161c['attributes']};}):[]};}):[]};}):[]:[]})[_0xa53a('0x1f')](function(_0xe10903){logger[_0xa53a('0x13')](_0xa53a('0x15'),_0xf61650);logger[_0xa53a('0xd')](_0xa53a('0x15'),_0xf61650,JSON['stringify'](_0xe10903));_0x379a0b(_0xe10903);})[_0xa53a('0x14')](function(_0x126af6){logger[_0xa53a('0x10')]('GetZohoAccount',_0x126af6['message'],_0xf61650);_0x2fe3c8(_0x2832ac[_0xa53a('0x10')](0x1f4,_0x126af6[_0xa53a('0x12')]));});});};exports[_0xa53a('0x20')]=function(_0x4bd9b9){var _0x2d78eb=this;return new Promise(function(_0xd60689,_0x7e6177){return db[_0xa53a('0x16')]['find']({'raw':_0x4bd9b9['options']?_0x4bd9b9[_0xa53a('0x18')][_0xa53a('0x19')]===undefined?!![]:![]:!![],'where':_0x4bd9b9[_0xa53a('0x18')]?_0x4bd9b9[_0xa53a('0x18')][_0xa53a('0x21')]||null:null,'attributes':_0x4bd9b9[_0xa53a('0x18')]?_0x4bd9b9[_0xa53a('0x18')][_0xa53a('0x1e')]||null:null,'include':_0x4bd9b9[_0xa53a('0x18')]?_0x4bd9b9['options'][_0xa53a('0x1b')]?_['map'](_0x4bd9b9[_0xa53a('0x18')][_0xa53a('0x1b')],function(_0x17e6b0){return{'model':db[_0x17e6b0[_0xa53a('0x1d')]],'as':_0x17e6b0['as'],'attributes':_0x17e6b0[_0xa53a('0x1e')],'include':_0x17e6b0[_0xa53a('0x1b')]?_[_0xa53a('0x1c')](_0x17e6b0[_0xa53a('0x1b')],function(_0x270f75){return{'model':db[_0x270f75['model']],'as':_0x270f75['as'],'attributes':_0x270f75[_0xa53a('0x1e')],'include':_0x270f75['include']?_['map'](_0x270f75[_0xa53a('0x1b')],function(_0x8aefcd){return{'model':db[_0x8aefcd[_0xa53a('0x1d')]],'as':_0x8aefcd['as'],'attributes':_0x8aefcd['attributes']};}):[]};}):[]};}):[]:[]})[_0xa53a('0x1f')](function(_0x5492fd){logger[_0xa53a('0x13')](_0xa53a('0x20'),_0x4bd9b9);logger['debug'](_0xa53a('0x20'),_0x4bd9b9,JSON[_0xa53a('0xf')](_0x5492fd));_0xd60689(_0x5492fd);})[_0xa53a('0x14')](function(_0x5e3ba3){logger[_0xa53a('0x10')](_0xa53a('0x20'),_0x5e3ba3['message'],_0x4bd9b9);_0x7e6177(_0x2d78eb[_0xa53a('0x10')](0x1f4,_0x5e3ba3[_0xa53a('0x12')]));});});};
\ No newline at end of file