Built motion from commit bbec7235.|2.6.20
[motion2.git] / server / api / intServicenowAccount / intServicenowAccount.rpc.js
index 28a048e..aec47df 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd17f=['info','ServicenowAccount,\x20%s,\x20%s','request\x20sent','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','GetServicenowAccount','ServicenowAccount','options','raw','limit','include','map','model','attributes','ShowServicenowAccount','find','where','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','request','then'];(function(_0x695b76,_0x551526){var _0x1dc21f=function(_0x5fdb1c){while(--_0x5fdb1c){_0x695b76['push'](_0x695b76['shift']());}};_0x1dc21f(++_0x551526);}(_0xd17f,0x1f2));var _0xfd17=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0xd17f[_0x1facfa];return _0x9ec701;};'use strict';var _=require(_0xfd17('0x0'));var util=require(_0xfd17('0x1'));var moment=require(_0xfd17('0x2'));var BPromise=require(_0xfd17('0x3'));var rs=require(_0xfd17('0x4'));var fs=require('fs');var Redis=require(_0xfd17('0x5'));var db=require(_0xfd17('0x6'))['db'];var utils=require(_0xfd17('0x7'));var logger=require(_0xfd17('0x8'))('rpc');var config=require('../../config/environment');var jayson=require(_0xfd17('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x29f250,_0x5688f8,_0x2ba4e6){return new BPromise(function(_0x240857,_0x22b0d7){return client[_0xfd17('0xa')](_0x29f250,_0x2ba4e6)[_0xfd17('0xb')](function(_0x28c1a3){logger[_0xfd17('0xc')](_0xfd17('0xd'),_0x5688f8,_0xfd17('0xe'));logger[_0xfd17('0xf')](_0xfd17('0x10'),_0x5688f8,'request\x20sent',JSON[_0xfd17('0x11')](_0x28c1a3));if(_0x28c1a3['error']){if(_0x28c1a3[_0xfd17('0x12')]['code']===0x1f4){logger[_0xfd17('0x12')](_0xfd17('0xd'),_0x5688f8,_0x28c1a3[_0xfd17('0x12')]['message']);return _0x22b0d7(_0x28c1a3[_0xfd17('0x12')]['message']);}logger[_0xfd17('0x12')]('ServicenowAccount,\x20%s,\x20%s',_0x5688f8,_0x28c1a3['error'][_0xfd17('0x13')]);return _0x240857(_0x28c1a3['error'][_0xfd17('0x13')]);}else{logger[_0xfd17('0xc')](_0xfd17('0xd'),_0x5688f8,_0xfd17('0xe'));_0x240857(_0x28c1a3[_0xfd17('0x14')][_0xfd17('0x13')]);}})[_0xfd17('0x15')](function(_0x4fa109){logger[_0xfd17('0x12')]('ServicenowAccount,\x20%s,\x20%s',_0x5688f8,_0x4fa109);_0x22b0d7(_0x4fa109);});});}exports[_0xfd17('0x16')]=function(_0x171d3){var _0x1a3b95=this;return new Promise(function(_0x5e9198,_0x4b2d6e){return db[_0xfd17('0x17')]['findAll']({'raw':_0x171d3[_0xfd17('0x18')]?_0x171d3[_0xfd17('0x18')][_0xfd17('0x19')]===undefined?!![]:![]:!![],'where':_0x171d3[_0xfd17('0x18')]?_0x171d3[_0xfd17('0x18')]['where']||null:null,'attributes':_0x171d3['options']?_0x171d3['options']['attributes']||null:null,'limit':_0x171d3[_0xfd17('0x18')]?_0x171d3[_0xfd17('0x18')][_0xfd17('0x1a')]||null:null,'include':_0x171d3[_0xfd17('0x18')]?_0x171d3[_0xfd17('0x18')][_0xfd17('0x1b')]?_[_0xfd17('0x1c')](_0x171d3[_0xfd17('0x18')][_0xfd17('0x1b')],function(_0x2d17f0){return{'model':db[_0x2d17f0[_0xfd17('0x1d')]],'as':_0x2d17f0['as'],'attributes':_0x2d17f0[_0xfd17('0x1e')],'include':_0x2d17f0['include']?_[_0xfd17('0x1c')](_0x2d17f0[_0xfd17('0x1b')],function(_0x32bc22){return{'model':db[_0x32bc22[_0xfd17('0x1d')]],'as':_0x32bc22['as'],'attributes':_0x32bc22[_0xfd17('0x1e')],'include':_0x32bc22[_0xfd17('0x1b')]?_[_0xfd17('0x1c')](_0x32bc22[_0xfd17('0x1b')],function(_0x3b9483){return{'model':db[_0x3b9483[_0xfd17('0x1d')]],'as':_0x3b9483['as'],'attributes':_0x3b9483['attributes']};}):[]};}):[]};}):[]:[]})[_0xfd17('0xb')](function(_0x1a8f73){logger[_0xfd17('0xc')](_0xfd17('0x16'),_0x171d3);logger[_0xfd17('0xf')](_0xfd17('0x16'),_0x171d3,JSON['stringify'](_0x1a8f73));_0x5e9198(_0x1a8f73);})['catch'](function(_0x36537b){logger[_0xfd17('0x12')]('GetServicenowAccount',_0x36537b[_0xfd17('0x13')],_0x171d3);_0x4b2d6e(_0x1a3b95['error'](0x1f4,_0x36537b['message']));});});};exports[_0xfd17('0x1f')]=function(_0x27824e){var _0x7524fd=this;return new Promise(function(_0xb31dfb,_0x3f24f1){return db[_0xfd17('0x17')][_0xfd17('0x20')]({'raw':_0x27824e[_0xfd17('0x18')]?_0x27824e[_0xfd17('0x18')][_0xfd17('0x19')]===undefined?!![]:![]:!![],'where':_0x27824e[_0xfd17('0x18')]?_0x27824e['options'][_0xfd17('0x21')]||null:null,'attributes':_0x27824e[_0xfd17('0x18')]?_0x27824e[_0xfd17('0x18')][_0xfd17('0x1e')]||null:null,'include':_0x27824e[_0xfd17('0x18')]?_0x27824e[_0xfd17('0x18')][_0xfd17('0x1b')]?_['map'](_0x27824e[_0xfd17('0x18')][_0xfd17('0x1b')],function(_0x5952ae){return{'model':db[_0x5952ae[_0xfd17('0x1d')]],'as':_0x5952ae['as'],'attributes':_0x5952ae[_0xfd17('0x1e')],'include':_0x5952ae[_0xfd17('0x1b')]?_[_0xfd17('0x1c')](_0x5952ae['include'],function(_0x120d28){return{'model':db[_0x120d28[_0xfd17('0x1d')]],'as':_0x120d28['as'],'attributes':_0x120d28['attributes'],'include':_0x120d28[_0xfd17('0x1b')]?_[_0xfd17('0x1c')](_0x120d28[_0xfd17('0x1b')],function(_0x407a78){return{'model':db[_0x407a78[_0xfd17('0x1d')]],'as':_0x407a78['as'],'attributes':_0x407a78[_0xfd17('0x1e')]};}):[]};}):[]};}):[]:[]})[_0xfd17('0xb')](function(_0x505cdd){logger['info'](_0xfd17('0x1f'),_0x27824e);logger[_0xfd17('0xf')](_0xfd17('0x1f'),_0x27824e,JSON[_0xfd17('0x11')](_0x505cdd));_0xb31dfb(_0x505cdd);})[_0xfd17('0x15')](function(_0x530d9a){logger[_0xfd17('0x12')](_0xfd17('0x1f'),_0x530d9a[_0xfd17('0x13')],_0x27824e);_0x3f24f1(_0x7524fd['error'](0x1f4,_0x530d9a[_0xfd17('0x13')]));});});};
\ No newline at end of file
+var _0x4cf3=['../../config/logger','rpc','client','http','then','info','request\x20sent','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','ServicenowAccount,\x20%s,\x20%s','result','ServicenowAccount','findAll','options','raw','where','attributes','limit','include','model','GetServicenowAccount','ShowServicenowAccount','find','map','util','moment','randomstring','../../mysqldb','../../config/utils'];(function(_0x5e5671,_0x457d56){var _0x3035f8=function(_0x3397e4){while(--_0x3397e4){_0x5e5671['push'](_0x5e5671['shift']());}};_0x3035f8(++_0x457d56);}(_0x4cf3,0x15b));var _0x34cf=function(_0x188f21,_0x2fe457){_0x188f21=_0x188f21-0x0;var _0x3391e0=_0x4cf3[_0x188f21];return _0x3391e0;};'use strict';var _=require('lodash');var util=require(_0x34cf('0x0'));var moment=require(_0x34cf('0x1'));var BPromise=require('bluebird');var rs=require(_0x34cf('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x34cf('0x3'))['db'];var utils=require(_0x34cf('0x4'));var logger=require(_0x34cf('0x5'))(_0x34cf('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x34cf('0x7')][_0x34cf('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x321ada,_0xf1c572,_0x46e1bb){return new BPromise(function(_0x129479,_0x3e63c6){return client['request'](_0x321ada,_0x46e1bb)[_0x34cf('0x9')](function(_0x75c071){logger[_0x34cf('0xa')]('ServicenowAccount,\x20%s,\x20%s',_0xf1c572,_0x34cf('0xb'));logger[_0x34cf('0xc')](_0x34cf('0xd'),_0xf1c572,'request\x20sent',JSON[_0x34cf('0xe')](_0x75c071));if(_0x75c071[_0x34cf('0xf')]){if(_0x75c071[_0x34cf('0xf')]['code']===0x1f4){logger['error']('ServicenowAccount,\x20%s,\x20%s',_0xf1c572,_0x75c071[_0x34cf('0xf')][_0x34cf('0x10')]);return _0x3e63c6(_0x75c071[_0x34cf('0xf')][_0x34cf('0x10')]);}logger['error']('ServicenowAccount,\x20%s,\x20%s',_0xf1c572,_0x75c071[_0x34cf('0xf')]['message']);return _0x129479(_0x75c071[_0x34cf('0xf')]['message']);}else{logger[_0x34cf('0xa')](_0x34cf('0x11'),_0xf1c572,_0x34cf('0xb'));_0x129479(_0x75c071[_0x34cf('0x12')][_0x34cf('0x10')]);}})['catch'](function(_0x436b4a){logger['error']('ServicenowAccount,\x20%s,\x20%s',_0xf1c572,_0x436b4a);_0x3e63c6(_0x436b4a);});});}exports['GetServicenowAccount']=function(_0x4e0924){var _0x47683c=this;return new Promise(function(_0x3a3172,_0x1358e1){return db[_0x34cf('0x13')][_0x34cf('0x14')]({'raw':_0x4e0924[_0x34cf('0x15')]?_0x4e0924[_0x34cf('0x15')][_0x34cf('0x16')]===undefined?!![]:![]:!![],'where':_0x4e0924['options']?_0x4e0924[_0x34cf('0x15')][_0x34cf('0x17')]||null:null,'attributes':_0x4e0924[_0x34cf('0x15')]?_0x4e0924['options'][_0x34cf('0x18')]||null:null,'limit':_0x4e0924[_0x34cf('0x15')]?_0x4e0924[_0x34cf('0x15')][_0x34cf('0x19')]||null:null,'include':_0x4e0924[_0x34cf('0x15')]?_0x4e0924[_0x34cf('0x15')][_0x34cf('0x1a')]?_['map'](_0x4e0924[_0x34cf('0x15')]['include'],function(_0x47d2cc){return{'model':db[_0x47d2cc[_0x34cf('0x1b')]],'as':_0x47d2cc['as'],'attributes':_0x47d2cc[_0x34cf('0x18')],'include':_0x47d2cc['include']?_['map'](_0x47d2cc[_0x34cf('0x1a')],function(_0x2e6386){return{'model':db[_0x2e6386[_0x34cf('0x1b')]],'as':_0x2e6386['as'],'attributes':_0x2e6386[_0x34cf('0x18')],'include':_0x2e6386[_0x34cf('0x1a')]?_['map'](_0x2e6386[_0x34cf('0x1a')],function(_0x41cb63){return{'model':db[_0x41cb63['model']],'as':_0x41cb63['as'],'attributes':_0x41cb63[_0x34cf('0x18')]};}):[]};}):[]};}):[]:[]})[_0x34cf('0x9')](function(_0x528fad){logger[_0x34cf('0xa')](_0x34cf('0x1c'),_0x4e0924);logger[_0x34cf('0xc')](_0x34cf('0x1c'),_0x4e0924,JSON[_0x34cf('0xe')](_0x528fad));_0x3a3172(_0x528fad);})['catch'](function(_0x32df47){logger[_0x34cf('0xf')](_0x34cf('0x1c'),_0x32df47[_0x34cf('0x10')],_0x4e0924);_0x1358e1(_0x47683c[_0x34cf('0xf')](0x1f4,_0x32df47['message']));});});};exports[_0x34cf('0x1d')]=function(_0x54a3e7){var _0x58d15a=this;return new Promise(function(_0xd792e2,_0x17f749){return db[_0x34cf('0x13')][_0x34cf('0x1e')]({'raw':_0x54a3e7[_0x34cf('0x15')]?_0x54a3e7[_0x34cf('0x15')][_0x34cf('0x16')]===undefined?!![]:![]:!![],'where':_0x54a3e7[_0x34cf('0x15')]?_0x54a3e7['options']['where']||null:null,'attributes':_0x54a3e7[_0x34cf('0x15')]?_0x54a3e7[_0x34cf('0x15')][_0x34cf('0x18')]||null:null,'include':_0x54a3e7[_0x34cf('0x15')]?_0x54a3e7['options'][_0x34cf('0x1a')]?_['map'](_0x54a3e7[_0x34cf('0x15')][_0x34cf('0x1a')],function(_0x4d7e9e){return{'model':db[_0x4d7e9e[_0x34cf('0x1b')]],'as':_0x4d7e9e['as'],'attributes':_0x4d7e9e[_0x34cf('0x18')],'include':_0x4d7e9e[_0x34cf('0x1a')]?_[_0x34cf('0x1f')](_0x4d7e9e[_0x34cf('0x1a')],function(_0x25cf9f){return{'model':db[_0x25cf9f[_0x34cf('0x1b')]],'as':_0x25cf9f['as'],'attributes':_0x25cf9f[_0x34cf('0x18')],'include':_0x25cf9f[_0x34cf('0x1a')]?_[_0x34cf('0x1f')](_0x25cf9f[_0x34cf('0x1a')],function(_0x2420b0){return{'model':db[_0x2420b0[_0x34cf('0x1b')]],'as':_0x2420b0['as'],'attributes':_0x2420b0['attributes']};}):[]};}):[]};}):[]:[]})[_0x34cf('0x9')](function(_0x38340f){logger['info'](_0x34cf('0x1d'),_0x54a3e7);logger[_0x34cf('0xc')]('ShowServicenowAccount',_0x54a3e7,JSON['stringify'](_0x38340f));_0xd792e2(_0x38340f);})['catch'](function(_0x1ab092){logger['error'](_0x34cf('0x1d'),_0x1ab092[_0x34cf('0x10')],_0x54a3e7);_0x17f749(_0x58d15a[_0x34cf('0xf')](0x1f4,_0x1ab092[_0x34cf('0x10')]));});});};
\ No newline at end of file