Built motion from commit (unavailable).|2.5.19
[motion2.git] / server / api / faxQueueReport / faxQueueReport.rpc.js
index 0e2daf3..c042d62 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcc0c=['update','raw','where','attributes','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','info','debug','FaxQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','FaxQueueReport,\x20%s,\x20%s','message','catch','CreateFaxQueueReport','FaxQueueReport','create','body','options','then','UpdateFaxQueueReport'];(function(_0x33032e,_0x31411a){var _0x13316b=function(_0x2fb049){while(--_0x2fb049){_0x33032e['push'](_0x33032e['shift']());}};_0x13316b(++_0x31411a);}(_0xcc0c,0x1f3));var _0xccc0=function(_0x303986,_0x5c751c){_0x303986=_0x303986-0x0;var _0x4c4431=_0xcc0c[_0x303986];return _0x4c4431;};'use strict';var _=require(_0xccc0('0x0'));var util=require(_0xccc0('0x1'));var moment=require(_0xccc0('0x2'));var BPromise=require(_0xccc0('0x3'));var rs=require(_0xccc0('0x4'));var fs=require('fs');var Redis=require(_0xccc0('0x5'));var db=require(_0xccc0('0x6'))['db'];var utils=require(_0xccc0('0x7'));var logger=require(_0xccc0('0x8'))(_0xccc0('0x9'));var config=require(_0xccc0('0xa'));var jayson=require('jayson/promise');var client=jayson[_0xccc0('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1e295c,_0x1d4d41,_0x2cb89a){return new BPromise(function(_0x44e06b,_0x1188c5){return client['request'](_0x1e295c,_0x2cb89a)['then'](function(_0x23f43b){logger[_0xccc0('0xc')]('FaxQueueReport,\x20%s,\x20%s',_0x1d4d41,'request\x20sent');logger[_0xccc0('0xd')](_0xccc0('0xe'),_0x1d4d41,_0xccc0('0xf'),JSON[_0xccc0('0x10')](_0x23f43b));if(_0x23f43b['error']){if(_0x23f43b[_0xccc0('0x11')][_0xccc0('0x12')]===0x1f4){logger[_0xccc0('0x11')](_0xccc0('0x13'),_0x1d4d41,_0x23f43b[_0xccc0('0x11')][_0xccc0('0x14')]);return _0x1188c5(_0x23f43b[_0xccc0('0x11')][_0xccc0('0x14')]);}logger[_0xccc0('0x11')]('FaxQueueReport,\x20%s,\x20%s',_0x1d4d41,_0x23f43b[_0xccc0('0x11')][_0xccc0('0x14')]);return _0x44e06b(_0x23f43b[_0xccc0('0x11')][_0xccc0('0x14')]);}else{logger[_0xccc0('0xc')](_0xccc0('0x13'),_0x1d4d41,_0xccc0('0xf'));_0x44e06b(_0x23f43b['result'][_0xccc0('0x14')]);}})[_0xccc0('0x15')](function(_0x47ecbc){logger['error'](_0xccc0('0x13'),_0x1d4d41,_0x47ecbc);_0x1188c5(_0x47ecbc);});});}exports[_0xccc0('0x16')]=function(_0x1086b1){var _0x494843=this;return new Promise(function(_0x26a406,_0x3e1811){return db[_0xccc0('0x17')][_0xccc0('0x18')](_0x1086b1[_0xccc0('0x19')],{'raw':_0x1086b1[_0xccc0('0x1a')]?_0x1086b1[_0xccc0('0x1a')]['raw']===undefined?!![]:![]:!![]})[_0xccc0('0x1b')](function(_0x5ea2fe){logger['info'](_0xccc0('0x16'),_0x1086b1);logger['debug'](_0xccc0('0x16'),_0x1086b1,JSON[_0xccc0('0x10')](_0x5ea2fe));_0x26a406(_0x5ea2fe);})['catch'](function(_0x26bf29){logger['error'](_0xccc0('0x16'),_0x26bf29[_0xccc0('0x14')],_0x1086b1);_0x3e1811(_0x494843[_0xccc0('0x11')](0x1f4,_0x26bf29[_0xccc0('0x14')]));});});};exports[_0xccc0('0x1c')]=function(_0xcabeb){var _0xff954e=this;return new Promise(function(_0x3e46e7,_0x7b8a23){return db[_0xccc0('0x17')][_0xccc0('0x1d')](_0xcabeb[_0xccc0('0x19')],{'raw':_0xcabeb[_0xccc0('0x1a')]?_0xcabeb['options'][_0xccc0('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xcabeb[_0xccc0('0x1a')]?_0xcabeb[_0xccc0('0x1a')][_0xccc0('0x1f')]||null:null,'attributes':_0xcabeb[_0xccc0('0x1a')]?_0xcabeb[_0xccc0('0x1a')][_0xccc0('0x20')]||null:null,'limit':_0xcabeb['options']?_0xcabeb[_0xccc0('0x1a')]['limit']||null:null})[_0xccc0('0x1b')](function(_0x474dea){logger[_0xccc0('0xc')](_0xccc0('0x1c'),_0xcabeb);logger[_0xccc0('0xd')](_0xccc0('0x1c'),_0xcabeb,JSON[_0xccc0('0x10')](_0x474dea));_0x3e46e7(_0x474dea);})[_0xccc0('0x15')](function(_0x1747b4){logger['error']('UpdateFaxQueueReport',_0x1747b4[_0xccc0('0x14')],_0xcabeb);_0x7b8a23(_0xff954e[_0xccc0('0x11')](0x1f4,_0x1747b4[_0xccc0('0x14')]));});});};
\ No newline at end of file
+var _0xe3ad=['debug','FaxQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','FaxQueueReport,\x20%s,\x20%s','message','request\x20sent','result','catch','CreateFaxQueueReport','raw','then','UpdateFaxQueueReport','options','where','attributes','limit','lodash','util','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','client','request','info'];(function(_0xf0dfb0,_0x5af513){var _0x1eb294=function(_0x297fd0){while(--_0x297fd0){_0xf0dfb0['push'](_0xf0dfb0['shift']());}};_0x1eb294(++_0x5af513);}(_0xe3ad,0x134));var _0xde3a=function(_0x3f8c37,_0x463f40){_0x3f8c37=_0x3f8c37-0x0;var _0x57f7e4=_0xe3ad[_0x3f8c37];return _0x57f7e4;};'use strict';var _=require(_0xde3a('0x0'));var util=require(_0xde3a('0x1'));var moment=require('moment');var BPromise=require(_0xde3a('0x2'));var rs=require(_0xde3a('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xde3a('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xde3a('0x5'))(_0xde3a('0x6'));var config=require(_0xde3a('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xde3a('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x581a55,_0x41e9f2,_0x556756){return new BPromise(function(_0x563a2e,_0x5af96e){return client[_0xde3a('0x9')](_0x581a55,_0x556756)['then'](function(_0x9731dd){logger[_0xde3a('0xa')]('FaxQueueReport,\x20%s,\x20%s',_0x41e9f2,'request\x20sent');logger[_0xde3a('0xb')](_0xde3a('0xc'),_0x41e9f2,'request\x20sent',JSON[_0xde3a('0xd')](_0x9731dd));if(_0x9731dd[_0xde3a('0xe')]){if(_0x9731dd[_0xde3a('0xe')][_0xde3a('0xf')]===0x1f4){logger[_0xde3a('0xe')](_0xde3a('0x10'),_0x41e9f2,_0x9731dd['error'][_0xde3a('0x11')]);return _0x5af96e(_0x9731dd[_0xde3a('0xe')][_0xde3a('0x11')]);}logger[_0xde3a('0xe')](_0xde3a('0x10'),_0x41e9f2,_0x9731dd[_0xde3a('0xe')]['message']);return _0x563a2e(_0x9731dd[_0xde3a('0xe')][_0xde3a('0x11')]);}else{logger[_0xde3a('0xa')](_0xde3a('0x10'),_0x41e9f2,_0xde3a('0x12'));_0x563a2e(_0x9731dd[_0xde3a('0x13')][_0xde3a('0x11')]);}})[_0xde3a('0x14')](function(_0x693641){logger[_0xde3a('0xe')](_0xde3a('0x10'),_0x41e9f2,_0x693641);_0x5af96e(_0x693641);});});}exports[_0xde3a('0x15')]=function(_0xb3c91c){var _0x41c74d=this;return new Promise(function(_0xc1164,_0x5b6402){return db['FaxQueueReport']['create'](_0xb3c91c['body'],{'raw':_0xb3c91c['options']?_0xb3c91c['options'][_0xde3a('0x16')]===undefined?!![]:![]:!![]})[_0xde3a('0x17')](function(_0x2a6e81){logger['info'](_0xde3a('0x15'),_0xb3c91c);logger[_0xde3a('0xb')](_0xde3a('0x15'),_0xb3c91c,JSON[_0xde3a('0xd')](_0x2a6e81));_0xc1164(_0x2a6e81);})[_0xde3a('0x14')](function(_0x30a7c2){logger['error'](_0xde3a('0x15'),_0x30a7c2[_0xde3a('0x11')],_0xb3c91c);_0x5b6402(_0x41c74d[_0xde3a('0xe')](0x1f4,_0x30a7c2[_0xde3a('0x11')]));});});};exports[_0xde3a('0x18')]=function(_0x238adf){var _0x480956=this;return new Promise(function(_0x5ad75b,_0x194158){return db['FaxQueueReport']['update'](_0x238adf['body'],{'raw':_0x238adf['options']?_0x238adf['options'][_0xde3a('0x16')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x238adf[_0xde3a('0x19')]?_0x238adf[_0xde3a('0x19')][_0xde3a('0x1a')]||null:null,'attributes':_0x238adf[_0xde3a('0x19')]?_0x238adf['options'][_0xde3a('0x1b')]||null:null,'limit':_0x238adf[_0xde3a('0x19')]?_0x238adf['options'][_0xde3a('0x1c')]||null:null})['then'](function(_0x453d6b){logger[_0xde3a('0xa')](_0xde3a('0x18'),_0x238adf);logger[_0xde3a('0xb')](_0xde3a('0x18'),_0x238adf,JSON['stringify'](_0x453d6b));_0x5ad75b(_0x453d6b);})[_0xde3a('0x14')](function(_0x6ca31d){logger[_0xde3a('0xe')]('UpdateFaxQueueReport',_0x6ca31d[_0xde3a('0x11')],_0x238adf);_0x194158(_0x480956[_0xde3a('0xe')](0x1f4,_0x6ca31d['message']));});});};
\ No newline at end of file