Built motion from commit (unavailable).|2.5.1
[motion2.git] / server / api / intZohoAccount / intZohoAccount.rpc.js
index 6410b34..db1140f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb0ca=['http','request','info','ZohoAccount,\x20%s,\x20%s','request\x20sent','debug','ZohoAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetZohoAccount','ZohoAccount','findAll','options','raw','where','attributes','limit','map','include','model','then','ShowZohoAccount','find','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client'];(function(_0xf98e2,_0x278b2c){var _0x4af687=function(_0x1885d2){while(--_0x1885d2){_0xf98e2['push'](_0xf98e2['shift']());}};_0x4af687(++_0x278b2c);}(_0xb0ca,0x1b2));var _0xab0c=function(_0x53830a,_0x3bf2dd){_0x53830a=_0x53830a-0x0;var _0x332a14=_0xb0ca[_0x53830a];return _0x332a14;};'use strict';var _=require('lodash');var util=require(_0xab0c('0x0'));var moment=require('moment');var BPromise=require(_0xab0c('0x1'));var rs=require(_0xab0c('0x2'));var fs=require('fs');var Redis=require(_0xab0c('0x3'));var db=require(_0xab0c('0x4'))['db'];var utils=require(_0xab0c('0x5'));var logger=require(_0xab0c('0x6'))(_0xab0c('0x7'));var config=require('../../config/environment');var jayson=require(_0xab0c('0x8'));var client=jayson[_0xab0c('0x9')][_0xab0c('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x871446,_0x4902a7,_0xbe11d1){return new BPromise(function(_0x50d3de,_0x22ebb5){return client[_0xab0c('0xb')](_0x871446,_0xbe11d1)['then'](function(_0x5172cd){logger[_0xab0c('0xc')](_0xab0c('0xd'),_0x4902a7,_0xab0c('0xe'));logger[_0xab0c('0xf')](_0xab0c('0x10'),_0x4902a7,'request\x20sent',JSON[_0xab0c('0x11')](_0x5172cd));if(_0x5172cd['error']){if(_0x5172cd[_0xab0c('0x12')][_0xab0c('0x13')]===0x1f4){logger[_0xab0c('0x12')](_0xab0c('0xd'),_0x4902a7,_0x5172cd[_0xab0c('0x12')][_0xab0c('0x14')]);return _0x22ebb5(_0x5172cd[_0xab0c('0x12')][_0xab0c('0x14')]);}logger[_0xab0c('0x12')](_0xab0c('0xd'),_0x4902a7,_0x5172cd['error']['message']);return _0x50d3de(_0x5172cd[_0xab0c('0x12')][_0xab0c('0x14')]);}else{logger[_0xab0c('0xc')](_0xab0c('0xd'),_0x4902a7,_0xab0c('0xe'));_0x50d3de(_0x5172cd[_0xab0c('0x15')][_0xab0c('0x14')]);}})[_0xab0c('0x16')](function(_0x3b80db){logger[_0xab0c('0x12')](_0xab0c('0xd'),_0x4902a7,_0x3b80db);_0x22ebb5(_0x3b80db);});});}exports[_0xab0c('0x17')]=function(_0x32931b){var _0x13d657=this;return new Promise(function(_0x3c8e62,_0x433777){return db[_0xab0c('0x18')][_0xab0c('0x19')]({'raw':_0x32931b[_0xab0c('0x1a')]?_0x32931b['options'][_0xab0c('0x1b')]===undefined?!![]:![]:!![],'where':_0x32931b['options']?_0x32931b[_0xab0c('0x1a')][_0xab0c('0x1c')]||null:null,'attributes':_0x32931b[_0xab0c('0x1a')]?_0x32931b[_0xab0c('0x1a')][_0xab0c('0x1d')]||null:null,'limit':_0x32931b[_0xab0c('0x1a')]?_0x32931b['options'][_0xab0c('0x1e')]||null:null,'include':_0x32931b[_0xab0c('0x1a')]?_0x32931b[_0xab0c('0x1a')]['include']?_[_0xab0c('0x1f')](_0x32931b['options'][_0xab0c('0x20')],function(_0x1cc6c4){return{'model':db[_0x1cc6c4[_0xab0c('0x21')]],'as':_0x1cc6c4['as'],'attributes':_0x1cc6c4['attributes'],'include':_0x1cc6c4[_0xab0c('0x20')]?_[_0xab0c('0x1f')](_0x1cc6c4['include'],function(_0x25479a){return{'model':db[_0x25479a[_0xab0c('0x21')]],'as':_0x25479a['as'],'attributes':_0x25479a[_0xab0c('0x1d')],'include':_0x25479a[_0xab0c('0x20')]?_[_0xab0c('0x1f')](_0x25479a[_0xab0c('0x20')],function(_0x3f12d4){return{'model':db[_0x3f12d4[_0xab0c('0x21')]],'as':_0x3f12d4['as'],'attributes':_0x3f12d4[_0xab0c('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xab0c('0x22')](function(_0x8b2234){logger[_0xab0c('0xc')](_0xab0c('0x17'),_0x32931b);logger['debug'](_0xab0c('0x17'),_0x32931b,JSON[_0xab0c('0x11')](_0x8b2234));_0x3c8e62(_0x8b2234);})[_0xab0c('0x16')](function(_0x233e48){logger['error']('GetZohoAccount',_0x233e48['message'],_0x32931b);_0x433777(_0x13d657['error'](0x1f4,_0x233e48[_0xab0c('0x14')]));});});};exports[_0xab0c('0x23')]=function(_0x3d1207){var _0x3e6b6e=this;return new Promise(function(_0xc34b9a,_0x4c441e){return db['ZohoAccount'][_0xab0c('0x24')]({'raw':_0x3d1207[_0xab0c('0x1a')]?_0x3d1207[_0xab0c('0x1a')][_0xab0c('0x1b')]===undefined?!![]:![]:!![],'where':_0x3d1207[_0xab0c('0x1a')]?_0x3d1207['options']['where']||null:null,'attributes':_0x3d1207['options']?_0x3d1207[_0xab0c('0x1a')][_0xab0c('0x1d')]||null:null,'include':_0x3d1207[_0xab0c('0x1a')]?_0x3d1207[_0xab0c('0x1a')][_0xab0c('0x20')]?_[_0xab0c('0x1f')](_0x3d1207[_0xab0c('0x1a')][_0xab0c('0x20')],function(_0x4eb32e){return{'model':db[_0x4eb32e[_0xab0c('0x21')]],'as':_0x4eb32e['as'],'attributes':_0x4eb32e[_0xab0c('0x1d')],'include':_0x4eb32e[_0xab0c('0x20')]?_[_0xab0c('0x1f')](_0x4eb32e['include'],function(_0x211e08){return{'model':db[_0x211e08[_0xab0c('0x21')]],'as':_0x211e08['as'],'attributes':_0x211e08[_0xab0c('0x1d')],'include':_0x211e08[_0xab0c('0x20')]?_[_0xab0c('0x1f')](_0x211e08['include'],function(_0x5d5633){return{'model':db[_0x5d5633['model']],'as':_0x5d5633['as'],'attributes':_0x5d5633['attributes']};}):[]};}):[]};}):[]:[]})[_0xab0c('0x22')](function(_0x51fe47){logger['info'](_0xab0c('0x23'),_0x3d1207);logger[_0xab0c('0xf')](_0xab0c('0x23'),_0x3d1207,JSON[_0xab0c('0x11')](_0x51fe47));_0xc34b9a(_0x51fe47);})['catch'](function(_0x2db79e){logger[_0xab0c('0x12')](_0xab0c('0x23'),_0x2db79e[_0xab0c('0x14')],_0x3d1207);_0x4c441e(_0x3e6b6e['error'](0x1f4,_0x2db79e[_0xab0c('0x14')]));});});};
\ No newline at end of file
+var _0x847f=['catch','GetZohoAccount','ZohoAccount','findAll','options','raw','where','attributes','limit','include','map','model','ShowZohoAccount','find','lodash','util','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','then','ZohoAccount,\x20%s,\x20%s','request\x20sent','debug','ZohoAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result'];(function(_0x2217fa,_0x4c6d9a){var _0x4156f1=function(_0x47e055){while(--_0x47e055){_0x2217fa['push'](_0x2217fa['shift']());}};_0x4156f1(++_0x4c6d9a);}(_0x847f,0xb8));var _0xf847=function(_0x111311,_0x1e2f69){_0x111311=_0x111311-0x0;var _0x4cef39=_0x847f[_0x111311];return _0x4cef39;};'use strict';var _=require(_0xf847('0x0'));var util=require(_0xf847('0x1'));var moment=require('moment');var BPromise=require(_0xf847('0x2'));var rs=require(_0xf847('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xf847('0x4'));var logger=require(_0xf847('0x5'))(_0xf847('0x6'));var config=require(_0xf847('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0xf847('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x177d10,_0x10a323,_0x1e8b47){return new BPromise(function(_0x59b84f,_0x199707){return client[_0xf847('0x9')](_0x177d10,_0x1e8b47)[_0xf847('0xa')](function(_0x2c20ad){logger['info'](_0xf847('0xb'),_0x10a323,_0xf847('0xc'));logger[_0xf847('0xd')](_0xf847('0xe'),_0x10a323,_0xf847('0xc'),JSON[_0xf847('0xf')](_0x2c20ad));if(_0x2c20ad['error']){if(_0x2c20ad[_0xf847('0x10')]['code']===0x1f4){logger['error'](_0xf847('0xb'),_0x10a323,_0x2c20ad[_0xf847('0x10')][_0xf847('0x11')]);return _0x199707(_0x2c20ad['error'][_0xf847('0x11')]);}logger['error'](_0xf847('0xb'),_0x10a323,_0x2c20ad['error'][_0xf847('0x11')]);return _0x59b84f(_0x2c20ad[_0xf847('0x10')][_0xf847('0x11')]);}else{logger[_0xf847('0x12')](_0xf847('0xb'),_0x10a323,_0xf847('0xc'));_0x59b84f(_0x2c20ad[_0xf847('0x13')][_0xf847('0x11')]);}})[_0xf847('0x14')](function(_0x3b8b70){logger['error'](_0xf847('0xb'),_0x10a323,_0x3b8b70);_0x199707(_0x3b8b70);});});}exports[_0xf847('0x15')]=function(_0x3a63b7){var _0x5cb706=this;return new Promise(function(_0xca0602,_0x2ec816){return db[_0xf847('0x16')][_0xf847('0x17')]({'raw':_0x3a63b7['options']?_0x3a63b7[_0xf847('0x18')][_0xf847('0x19')]===undefined?!![]:![]:!![],'where':_0x3a63b7[_0xf847('0x18')]?_0x3a63b7['options'][_0xf847('0x1a')]||null:null,'attributes':_0x3a63b7['options']?_0x3a63b7[_0xf847('0x18')][_0xf847('0x1b')]||null:null,'limit':_0x3a63b7[_0xf847('0x18')]?_0x3a63b7[_0xf847('0x18')][_0xf847('0x1c')]||null:null,'include':_0x3a63b7[_0xf847('0x18')]?_0x3a63b7[_0xf847('0x18')][_0xf847('0x1d')]?_[_0xf847('0x1e')](_0x3a63b7[_0xf847('0x18')]['include'],function(_0x332fe1){return{'model':db[_0x332fe1[_0xf847('0x1f')]],'as':_0x332fe1['as'],'attributes':_0x332fe1[_0xf847('0x1b')],'include':_0x332fe1[_0xf847('0x1d')]?_['map'](_0x332fe1[_0xf847('0x1d')],function(_0x1710a8){return{'model':db[_0x1710a8['model']],'as':_0x1710a8['as'],'attributes':_0x1710a8[_0xf847('0x1b')],'include':_0x1710a8['include']?_[_0xf847('0x1e')](_0x1710a8[_0xf847('0x1d')],function(_0x37e0ae){return{'model':db[_0x37e0ae[_0xf847('0x1f')]],'as':_0x37e0ae['as'],'attributes':_0x37e0ae[_0xf847('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xf847('0xa')](function(_0x112dae){logger[_0xf847('0x12')](_0xf847('0x15'),_0x3a63b7);logger['debug'](_0xf847('0x15'),_0x3a63b7,JSON[_0xf847('0xf')](_0x112dae));_0xca0602(_0x112dae);})[_0xf847('0x14')](function(_0x4b28a9){logger[_0xf847('0x10')](_0xf847('0x15'),_0x4b28a9['message'],_0x3a63b7);_0x2ec816(_0x5cb706['error'](0x1f4,_0x4b28a9[_0xf847('0x11')]));});});};exports[_0xf847('0x20')]=function(_0x504285){var _0x1b84c7=this;return new Promise(function(_0xcbf57f,_0x319097){return db['ZohoAccount'][_0xf847('0x21')]({'raw':_0x504285[_0xf847('0x18')]?_0x504285[_0xf847('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x504285[_0xf847('0x18')]?_0x504285[_0xf847('0x18')][_0xf847('0x1a')]||null:null,'attributes':_0x504285[_0xf847('0x18')]?_0x504285[_0xf847('0x18')]['attributes']||null:null,'include':_0x504285['options']?_0x504285[_0xf847('0x18')]['include']?_[_0xf847('0x1e')](_0x504285['options']['include'],function(_0x4bafc9){return{'model':db[_0x4bafc9['model']],'as':_0x4bafc9['as'],'attributes':_0x4bafc9[_0xf847('0x1b')],'include':_0x4bafc9[_0xf847('0x1d')]?_['map'](_0x4bafc9[_0xf847('0x1d')],function(_0x1843de){return{'model':db[_0x1843de[_0xf847('0x1f')]],'as':_0x1843de['as'],'attributes':_0x1843de[_0xf847('0x1b')],'include':_0x1843de[_0xf847('0x1d')]?_[_0xf847('0x1e')](_0x1843de[_0xf847('0x1d')],function(_0x4ed268){return{'model':db[_0x4ed268['model']],'as':_0x4ed268['as'],'attributes':_0x4ed268[_0xf847('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xf847('0xa')](function(_0x14519c){logger[_0xf847('0x12')](_0xf847('0x20'),_0x504285);logger['debug'](_0xf847('0x20'),_0x504285,JSON[_0xf847('0xf')](_0x14519c));_0xcbf57f(_0x14519c);})[_0xf847('0x14')](function(_0x4a61d1){logger[_0xf847('0x10')]('ShowZohoAccount',_0x4a61d1[_0xf847('0x11')],_0x504285);_0x319097(_0x1b84c7[_0xf847('0x10')](0x1f4,_0x4a61d1[_0xf847('0x11')]));});});};
\ No newline at end of file