Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / faxQueueReport / faxQueueReport.rpc.js
index 753e537..ab96df0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbe04=['FaxQueueReport,\x20%s,\x20%s,\x20%s','error','message','info','result','catch','CreateFaxQueueReport','FaxQueueReport','body','options','raw','stringify','UpdateFaxQueueReport','where','limit','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','request','then','FaxQueueReport,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x2f3968,_0x596606){var _0x35d098=function(_0x56f450){while(--_0x56f450){_0x2f3968['push'](_0x2f3968['shift']());}};_0x35d098(++_0x596606);}(_0xbe04,0xe8));var _0x4be0=function(_0xa9a245,_0x2a0387){_0xa9a245=_0xa9a245-0x0;var _0x2d0eaa=_0xbe04[_0xa9a245];return _0x2d0eaa;};'use strict';var _=require(_0x4be0('0x0'));var util=require('util');var moment=require(_0x4be0('0x1'));var BPromise=require(_0x4be0('0x2'));var rs=require(_0x4be0('0x3'));var fs=require('fs');var Redis=require(_0x4be0('0x4'));var db=require(_0x4be0('0x5'))['db'];var utils=require(_0x4be0('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x4be0('0x7'));var jayson=require(_0x4be0('0x8'));var client=jayson[_0x4be0('0x9')][_0x4be0('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x46d65e,_0x1912bf,_0x2d3cb4){return new BPromise(function(_0x2b69ec,_0x3b939c){return client[_0x4be0('0xb')](_0x46d65e,_0x2d3cb4)[_0x4be0('0xc')](function(_0x399d7e){logger['info'](_0x4be0('0xd'),_0x1912bf,_0x4be0('0xe'));logger[_0x4be0('0xf')](_0x4be0('0x10'),_0x1912bf,_0x4be0('0xe'),JSON['stringify'](_0x399d7e));if(_0x399d7e[_0x4be0('0x11')]){if(_0x399d7e[_0x4be0('0x11')]['code']===0x1f4){logger[_0x4be0('0x11')](_0x4be0('0xd'),_0x1912bf,_0x399d7e[_0x4be0('0x11')][_0x4be0('0x12')]);return _0x3b939c(_0x399d7e[_0x4be0('0x11')][_0x4be0('0x12')]);}logger[_0x4be0('0x11')](_0x4be0('0xd'),_0x1912bf,_0x399d7e[_0x4be0('0x11')][_0x4be0('0x12')]);return _0x2b69ec(_0x399d7e[_0x4be0('0x11')][_0x4be0('0x12')]);}else{logger[_0x4be0('0x13')](_0x4be0('0xd'),_0x1912bf,'request\x20sent');_0x2b69ec(_0x399d7e[_0x4be0('0x14')][_0x4be0('0x12')]);}})[_0x4be0('0x15')](function(_0x38b034){logger[_0x4be0('0x11')](_0x4be0('0xd'),_0x1912bf,_0x38b034);_0x3b939c(_0x38b034);});});}exports[_0x4be0('0x16')]=function(_0x50625c){var _0x1e1177=this;return new Promise(function(_0x542fdb,_0x462823){return db[_0x4be0('0x17')]['create'](_0x50625c[_0x4be0('0x18')],{'raw':_0x50625c[_0x4be0('0x19')]?_0x50625c[_0x4be0('0x19')][_0x4be0('0x1a')]===undefined?!![]:![]:!![]})[_0x4be0('0xc')](function(_0x5593ea){logger[_0x4be0('0x13')]('CreateFaxQueueReport',_0x50625c);logger[_0x4be0('0xf')](_0x4be0('0x16'),_0x50625c,JSON[_0x4be0('0x1b')](_0x5593ea));_0x542fdb(_0x5593ea);})[_0x4be0('0x15')](function(_0xd944ec){logger['error'](_0x4be0('0x16'),_0xd944ec['message'],_0x50625c);_0x462823(_0x1e1177[_0x4be0('0x11')](0x1f4,_0xd944ec[_0x4be0('0x12')]));});});};exports[_0x4be0('0x1c')]=function(_0x4a39ef){var _0x47f9fd=this;return new Promise(function(_0x5c01a3,_0x421fa3){return db[_0x4be0('0x17')]['update'](_0x4a39ef[_0x4be0('0x18')],{'raw':_0x4a39ef[_0x4be0('0x19')]?_0x4a39ef[_0x4be0('0x19')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4a39ef[_0x4be0('0x19')]?_0x4a39ef['options'][_0x4be0('0x1d')]||null:null,'attributes':_0x4a39ef[_0x4be0('0x19')]?_0x4a39ef[_0x4be0('0x19')]['attributes']||null:null,'limit':_0x4a39ef[_0x4be0('0x19')]?_0x4a39ef[_0x4be0('0x19')][_0x4be0('0x1e')]||null:null})['then'](function(_0x2bf3a1){logger[_0x4be0('0x13')]('UpdateFaxQueueReport',_0x4a39ef);logger['debug'](_0x4be0('0x1c'),_0x4a39ef,JSON['stringify'](_0x2bf3a1));_0x5c01a3(_0x2bf3a1);})['catch'](function(_0xb9b315){logger[_0x4be0('0x11')](_0x4be0('0x1c'),_0xb9b315[_0x4be0('0x12')],_0x4a39ef);_0x421fa3(_0x47f9fd[_0x4be0('0x11')](0x1f4,_0xb9b315[_0x4be0('0x12')]));});});};
\ No newline at end of file
+var _0x1dfe=['code','message','result','catch','CreateFaxQueueReport','body','options','raw','debug','where','attributes','UpdateFaxQueueReport','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','FaxQueueReport,\x20%s,\x20%s','request\x20sent','FaxQueueReport,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x1c7c99,_0x3cf724){var _0x1f8b0a=function(_0x5026e8){while(--_0x5026e8){_0x1c7c99['push'](_0x1c7c99['shift']());}};_0x1f8b0a(++_0x3cf724);}(_0x1dfe,0x138));var _0xe1df=function(_0x454ea7,_0x5f2b23){_0x454ea7=_0x454ea7-0x0;var _0x5865aa=_0x1dfe[_0x454ea7];return _0x5865aa;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xe1df('0x0'));var BPromise=require(_0xe1df('0x1'));var rs=require(_0xe1df('0x2'));var fs=require('fs');var Redis=require(_0xe1df('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xe1df('0x4'));var logger=require(_0xe1df('0x5'))(_0xe1df('0x6'));var config=require(_0xe1df('0x7'));var jayson=require(_0xe1df('0x8'));var client=jayson[_0xe1df('0x9')][_0xe1df('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3c635f,_0x2c51a9,_0x2ad51b){return new BPromise(function(_0x53e2d8,_0x18f363){return client['request'](_0x3c635f,_0x2ad51b)[_0xe1df('0xb')](function(_0x2d16c7){logger[_0xe1df('0xc')](_0xe1df('0xd'),_0x2c51a9,_0xe1df('0xe'));logger['debug'](_0xe1df('0xf'),_0x2c51a9,_0xe1df('0xe'),JSON[_0xe1df('0x10')](_0x2d16c7));if(_0x2d16c7[_0xe1df('0x11')]){if(_0x2d16c7[_0xe1df('0x11')][_0xe1df('0x12')]===0x1f4){logger['error'](_0xe1df('0xd'),_0x2c51a9,_0x2d16c7[_0xe1df('0x11')]['message']);return _0x18f363(_0x2d16c7['error']['message']);}logger[_0xe1df('0x11')](_0xe1df('0xd'),_0x2c51a9,_0x2d16c7[_0xe1df('0x11')][_0xe1df('0x13')]);return _0x53e2d8(_0x2d16c7[_0xe1df('0x11')][_0xe1df('0x13')]);}else{logger[_0xe1df('0xc')](_0xe1df('0xd'),_0x2c51a9,_0xe1df('0xe'));_0x53e2d8(_0x2d16c7[_0xe1df('0x14')][_0xe1df('0x13')]);}})[_0xe1df('0x15')](function(_0x4d2b7a){logger[_0xe1df('0x11')](_0xe1df('0xd'),_0x2c51a9,_0x4d2b7a);_0x18f363(_0x4d2b7a);});});}exports[_0xe1df('0x16')]=function(_0x173186){var _0x31678c=this;return new Promise(function(_0x567a18,_0x48f2a4){return db['FaxQueueReport']['create'](_0x173186[_0xe1df('0x17')],{'raw':_0x173186[_0xe1df('0x18')]?_0x173186[_0xe1df('0x18')][_0xe1df('0x19')]===undefined?!![]:![]:!![]})[_0xe1df('0xb')](function(_0x187d60){logger[_0xe1df('0xc')]('CreateFaxQueueReport',_0x173186);logger[_0xe1df('0x1a')](_0xe1df('0x16'),_0x173186,JSON['stringify'](_0x187d60));_0x567a18(_0x187d60);})[_0xe1df('0x15')](function(_0x5b6f2a){logger[_0xe1df('0x11')](_0xe1df('0x16'),_0x5b6f2a[_0xe1df('0x13')],_0x173186);_0x48f2a4(_0x31678c[_0xe1df('0x11')](0x1f4,_0x5b6f2a[_0xe1df('0x13')]));});});};exports['UpdateFaxQueueReport']=function(_0x1248a6){var _0xbd4d4b=this;return new Promise(function(_0x202f5d,_0x49cd48){return db['FaxQueueReport']['update'](_0x1248a6['body'],{'raw':_0x1248a6[_0xe1df('0x18')]?_0x1248a6['options'][_0xe1df('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1248a6[_0xe1df('0x18')]?_0x1248a6[_0xe1df('0x18')][_0xe1df('0x1b')]||null:null,'attributes':_0x1248a6[_0xe1df('0x18')]?_0x1248a6[_0xe1df('0x18')][_0xe1df('0x1c')]||null:null,'limit':_0x1248a6[_0xe1df('0x18')]?_0x1248a6[_0xe1df('0x18')]['limit']||null:null})[_0xe1df('0xb')](function(_0x88b6d5){logger['info']('UpdateFaxQueueReport',_0x1248a6);logger[_0xe1df('0x1a')]('UpdateFaxQueueReport',_0x1248a6,JSON[_0xe1df('0x10')](_0x88b6d5));_0x202f5d(_0x88b6d5);})[_0xe1df('0x15')](function(_0x2e50d6){logger[_0xe1df('0x11')](_0xe1df('0x1d'),_0x2e50d6[_0xe1df('0x13')],_0x1248a6);_0x49cd48(_0xbd4d4b['error'](0x1f4,_0x2e50d6['message']));});});};
\ No newline at end of file