Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / chatQueueReport / chatQueueReport.rpc.js
index 046b59d..4070dba 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xafdc=['ChatQueueReport,\x20%s,\x20%s','message','create','options','raw','CreateChatQueueReport','stringify','catch','UpdateChatQueueReport','ChatQueueReport','update','body','where','attributes','limit','lodash','util','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','client','http','request','then','info','request\x20sent','debug','error','code'];(function(_0x2cf2e9,_0xd58ea1){var _0xd3670d=function(_0x272868){while(--_0x272868){_0x2cf2e9['push'](_0x2cf2e9['shift']());}};_0xd3670d(++_0xd58ea1);}(_0xafdc,0x1af));var _0xcafd=function(_0x2ac608,_0x4ffc74){_0x2ac608=_0x2ac608-0x0;var _0x1e9151=_0xafdc[_0x2ac608];return _0x1e9151;};'use strict';var _=require(_0xcafd('0x0'));var util=require(_0xcafd('0x1'));var moment=require('moment');var BPromise=require(_0xcafd('0x2'));var rs=require(_0xcafd('0x3'));var fs=require('fs');var Redis=require(_0xcafd('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xcafd('0x5'));var logger=require('../../config/logger')(_0xcafd('0x6'));var config=require(_0xcafd('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xcafd('0x8')][_0xcafd('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x33710e,_0x26ebe6,_0x1568ca){return new BPromise(function(_0x186ce0,_0x175f56){return client[_0xcafd('0xa')](_0x33710e,_0x1568ca)[_0xcafd('0xb')](function(_0x37d151){logger[_0xcafd('0xc')]('ChatQueueReport,\x20%s,\x20%s',_0x26ebe6,_0xcafd('0xd'));logger[_0xcafd('0xe')]('ChatQueueReport,\x20%s,\x20%s,\x20%s',_0x26ebe6,_0xcafd('0xd'),JSON['stringify'](_0x37d151));if(_0x37d151[_0xcafd('0xf')]){if(_0x37d151[_0xcafd('0xf')][_0xcafd('0x10')]===0x1f4){logger[_0xcafd('0xf')](_0xcafd('0x11'),_0x26ebe6,_0x37d151['error'][_0xcafd('0x12')]);return _0x175f56(_0x37d151['error'][_0xcafd('0x12')]);}logger[_0xcafd('0xf')]('ChatQueueReport,\x20%s,\x20%s',_0x26ebe6,_0x37d151['error'][_0xcafd('0x12')]);return _0x186ce0(_0x37d151[_0xcafd('0xf')][_0xcafd('0x12')]);}else{logger[_0xcafd('0xc')]('ChatQueueReport,\x20%s,\x20%s',_0x26ebe6,'request\x20sent');_0x186ce0(_0x37d151['result'][_0xcafd('0x12')]);}})['catch'](function(_0x382551){logger[_0xcafd('0xf')](_0xcafd('0x11'),_0x26ebe6,_0x382551);_0x175f56(_0x382551);});});}exports['CreateChatQueueReport']=function(_0xe67922){var _0x5040af=this;return new Promise(function(_0x47f55a,_0x1abc43){return db['ChatQueueReport'][_0xcafd('0x13')](_0xe67922['body'],{'raw':_0xe67922[_0xcafd('0x14')]?_0xe67922[_0xcafd('0x14')][_0xcafd('0x15')]===undefined?!![]:![]:!![]})[_0xcafd('0xb')](function(_0xc28bcc){logger['info'](_0xcafd('0x16'),_0xe67922);logger[_0xcafd('0xe')](_0xcafd('0x16'),_0xe67922,JSON[_0xcafd('0x17')](_0xc28bcc));_0x47f55a(_0xc28bcc);})[_0xcafd('0x18')](function(_0x146f13){logger['error'](_0xcafd('0x16'),_0x146f13[_0xcafd('0x12')],_0xe67922);_0x1abc43(_0x5040af[_0xcafd('0xf')](0x1f4,_0x146f13[_0xcafd('0x12')]));});});};exports[_0xcafd('0x19')]=function(_0x59bb96){var _0x314b01=this;return new Promise(function(_0x343b35,_0x3ba3b1){return db[_0xcafd('0x1a')][_0xcafd('0x1b')](_0x59bb96[_0xcafd('0x1c')],{'raw':_0x59bb96[_0xcafd('0x14')]?_0x59bb96[_0xcafd('0x14')][_0xcafd('0x15')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x59bb96[_0xcafd('0x14')]?_0x59bb96[_0xcafd('0x14')][_0xcafd('0x1d')]||null:null,'attributes':_0x59bb96[_0xcafd('0x14')]?_0x59bb96['options'][_0xcafd('0x1e')]||null:null,'limit':_0x59bb96['options']?_0x59bb96['options'][_0xcafd('0x1f')]||null:null})[_0xcafd('0xb')](function(_0x5b5cf3){logger[_0xcafd('0xc')](_0xcafd('0x19'),_0x59bb96);logger['debug']('UpdateChatQueueReport',_0x59bb96,JSON[_0xcafd('0x17')](_0x5b5cf3));_0x343b35(_0x5b5cf3);})['catch'](function(_0x5be84a){logger['error'](_0xcafd('0x19'),_0x5be84a[_0xcafd('0x12')],_0x59bb96);_0x3ba3b1(_0x314b01[_0xcafd('0xf')](0x1f4,_0x5be84a[_0xcafd('0x12')]));});});};
\ No newline at end of file
+var _0x3821=['then','info','ChatQueueReport,\x20%s,\x20%s','request\x20sent','ChatQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','CreateChatQueueReport','ChatQueueReport','body','options','debug','UpdateChatQueueReport','update','raw','where','limit','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request'];(function(_0x2d10f7,_0x36abd0){var _0x94c2f7=function(_0xcb5708){while(--_0xcb5708){_0x2d10f7['push'](_0x2d10f7['shift']());}};_0x94c2f7(++_0x36abd0);}(_0x3821,0x1c1));var _0x1382=function(_0x400bb4,_0x1b710e){_0x400bb4=_0x400bb4-0x0;var _0x4b1c24=_0x3821[_0x400bb4];return _0x4b1c24;};'use strict';var _=require(_0x1382('0x0'));var util=require(_0x1382('0x1'));var moment=require(_0x1382('0x2'));var BPromise=require('bluebird');var rs=require(_0x1382('0x3'));var fs=require('fs');var Redis=require(_0x1382('0x4'));var db=require(_0x1382('0x5'))['db'];var utils=require(_0x1382('0x6'));var logger=require(_0x1382('0x7'))('rpc');var config=require(_0x1382('0x8'));var jayson=require(_0x1382('0x9'));var client=jayson[_0x1382('0xa')][_0x1382('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3aa3c0,_0x11b84e,_0x1e70e0){return new BPromise(function(_0x498673,_0xd74af4){return client[_0x1382('0xc')](_0x3aa3c0,_0x1e70e0)[_0x1382('0xd')](function(_0x42229e){logger[_0x1382('0xe')](_0x1382('0xf'),_0x11b84e,_0x1382('0x10'));logger['debug'](_0x1382('0x11'),_0x11b84e,_0x1382('0x10'),JSON[_0x1382('0x12')](_0x42229e));if(_0x42229e[_0x1382('0x13')]){if(_0x42229e['error'][_0x1382('0x14')]===0x1f4){logger[_0x1382('0x13')](_0x1382('0xf'),_0x11b84e,_0x42229e[_0x1382('0x13')][_0x1382('0x15')]);return _0xd74af4(_0x42229e['error'][_0x1382('0x15')]);}logger[_0x1382('0x13')](_0x1382('0xf'),_0x11b84e,_0x42229e[_0x1382('0x13')][_0x1382('0x15')]);return _0x498673(_0x42229e[_0x1382('0x13')][_0x1382('0x15')]);}else{logger[_0x1382('0xe')](_0x1382('0xf'),_0x11b84e,_0x1382('0x10'));_0x498673(_0x42229e['result'][_0x1382('0x15')]);}})[_0x1382('0x16')](function(_0x4c88cb){logger[_0x1382('0x13')]('ChatQueueReport,\x20%s,\x20%s',_0x11b84e,_0x4c88cb);_0xd74af4(_0x4c88cb);});});}exports[_0x1382('0x17')]=function(_0x42618d){var _0x486f7d=this;return new Promise(function(_0x3972d5,_0x144f74){return db[_0x1382('0x18')]['create'](_0x42618d[_0x1382('0x19')],{'raw':_0x42618d[_0x1382('0x1a')]?_0x42618d['options']['raw']===undefined?!![]:![]:!![]})[_0x1382('0xd')](function(_0x37ea46){logger[_0x1382('0xe')](_0x1382('0x17'),_0x42618d);logger[_0x1382('0x1b')](_0x1382('0x17'),_0x42618d,JSON['stringify'](_0x37ea46));_0x3972d5(_0x37ea46);})[_0x1382('0x16')](function(_0x2e5d0d){logger[_0x1382('0x13')]('CreateChatQueueReport',_0x2e5d0d['message'],_0x42618d);_0x144f74(_0x486f7d['error'](0x1f4,_0x2e5d0d[_0x1382('0x15')]));});});};exports[_0x1382('0x1c')]=function(_0x107a3f){var _0x34dc21=this;return new Promise(function(_0x597b8a,_0x59f19){return db[_0x1382('0x18')][_0x1382('0x1d')](_0x107a3f[_0x1382('0x19')],{'raw':_0x107a3f['options']?_0x107a3f[_0x1382('0x1a')][_0x1382('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x107a3f[_0x1382('0x1a')]?_0x107a3f[_0x1382('0x1a')][_0x1382('0x1f')]||null:null,'attributes':_0x107a3f['options']?_0x107a3f['options']['attributes']||null:null,'limit':_0x107a3f[_0x1382('0x1a')]?_0x107a3f[_0x1382('0x1a')][_0x1382('0x20')]||null:null})['then'](function(_0x1f119d){logger[_0x1382('0xe')](_0x1382('0x1c'),_0x107a3f);logger[_0x1382('0x1b')](_0x1382('0x1c'),_0x107a3f,JSON['stringify'](_0x1f119d));_0x597b8a(_0x1f119d);})[_0x1382('0x16')](function(_0x4b0836){logger[_0x1382('0x13')](_0x1382('0x1c'),_0x4b0836[_0x1382('0x15')],_0x107a3f);_0x59f19(_0x34dc21['error'](0x1f4,_0x4b0836[_0x1382('0x15')]));});});};
\ No newline at end of file