Built motion from commit 20b39a97.|2.6.29
[motion2.git] / server / api / faxApplication / faxApplication.rpc.js
index 21d87b8..e335982 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8563=['FaxApplication','options','raw','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','info','request\x20sent','debug','FaxApplication,\x20%s,\x20%s,\x20%s','error','code','FaxApplication,\x20%s,\x20%s','message','result','catch','UpdateFaxApplication'];(function(_0xdea41a,_0x552987){var _0x15d0d8=function(_0x1e0d0b){while(--_0x1e0d0b){_0xdea41a['push'](_0xdea41a['shift']());}};_0x15d0d8(++_0x552987);}(_0x8563,0xdb));var _0x3856=function(_0x11c0ad,_0x134629){_0x11c0ad=_0x11c0ad-0x0;var _0x543a44=_0x8563[_0x11c0ad];return _0x543a44;};'use strict';var _=require(_0x3856('0x0'));var util=require(_0x3856('0x1'));var moment=require(_0x3856('0x2'));var BPromise=require(_0x3856('0x3'));var rs=require(_0x3856('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x3856('0x5'))['db'];var utils=require(_0x3856('0x6'));var logger=require(_0x3856('0x7'))(_0x3856('0x8'));var config=require(_0x3856('0x9'));var jayson=require(_0x3856('0xa'));var client=jayson[_0x3856('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5e025d,_0x294a5f,_0x1337d4){return new BPromise(function(_0x3b0e60,_0x4f33bc){return client['request'](_0x5e025d,_0x1337d4)[_0x3856('0xc')](function(_0x561674){logger[_0x3856('0xd')]('FaxApplication,\x20%s,\x20%s',_0x294a5f,_0x3856('0xe'));logger[_0x3856('0xf')](_0x3856('0x10'),_0x294a5f,_0x3856('0xe'),JSON['stringify'](_0x561674));if(_0x561674[_0x3856('0x11')]){if(_0x561674[_0x3856('0x11')][_0x3856('0x12')]===0x1f4){logger[_0x3856('0x11')](_0x3856('0x13'),_0x294a5f,_0x561674['error'][_0x3856('0x14')]);return _0x4f33bc(_0x561674[_0x3856('0x11')][_0x3856('0x14')]);}logger[_0x3856('0x11')](_0x3856('0x13'),_0x294a5f,_0x561674[_0x3856('0x11')]['message']);return _0x3b0e60(_0x561674[_0x3856('0x11')][_0x3856('0x14')]);}else{logger[_0x3856('0xd')](_0x3856('0x13'),_0x294a5f,'request\x20sent');_0x3b0e60(_0x561674[_0x3856('0x15')][_0x3856('0x14')]);}})[_0x3856('0x16')](function(_0x5656a7){logger[_0x3856('0x11')]('FaxApplication,\x20%s,\x20%s',_0x294a5f,_0x5656a7);_0x4f33bc(_0x5656a7);});});}exports[_0x3856('0x17')]=function(_0x53f52a){var _0x5b3295=this;return new Promise(function(_0x249c87,_0x4b8ba2){return db[_0x3856('0x18')]['update'](_0x53f52a['body'],{'raw':_0x53f52a[_0x3856('0x19')]?_0x53f52a['options'][_0x3856('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x53f52a[_0x3856('0x19')]?_0x53f52a['options']['where']||null:null,'attributes':_0x53f52a[_0x3856('0x19')]?_0x53f52a[_0x3856('0x19')]['attributes']||null:null,'limit':_0x53f52a[_0x3856('0x19')]?_0x53f52a[_0x3856('0x19')]['limit']||null:null})['then'](function(_0x2c160e){logger['info'](_0x3856('0x17'),_0x53f52a);logger['debug'](_0x3856('0x17'),_0x53f52a,JSON['stringify'](_0x2c160e));_0x249c87(_0x2c160e);})['catch'](function(_0x3f0144){logger[_0x3856('0x11')]('UpdateFaxApplication',_0x3f0144[_0x3856('0x14')],_0x53f52a);_0x4b8ba2(_0x5b3295[_0x3856('0x11')](0x1f4,_0x3f0144[_0x3856('0x14')]));});});};
\ No newline at end of file
+var _0x3718=['../../mysqldb','../../config/utils','rpc','jayson/promise','http','request','then','request\x20sent','debug','FaxApplication,\x20%s,\x20%s,\x20%s','stringify','error','FaxApplication,\x20%s,\x20%s','message','info','body','options','where','attributes','limit','UpdateFaxApplication','catch','lodash','util','moment','randomstring'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x3718,0xb2));var _0x8371=function(_0x2fa2b9,_0x1f876a){_0x2fa2b9=_0x2fa2b9-0x0;var _0x3dc9e6=_0x3718[_0x2fa2b9];return _0x3dc9e6;};'use strict';var _=require(_0x8371('0x0'));var util=require(_0x8371('0x1'));var moment=require(_0x8371('0x2'));var BPromise=require('bluebird');var rs=require(_0x8371('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8371('0x4'))['db'];var utils=require(_0x8371('0x5'));var logger=require('../../config/logger')(_0x8371('0x6'));var config=require('../../config/environment');var jayson=require(_0x8371('0x7'));var client=jayson['client'][_0x8371('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x516885,_0x5eebe2,_0x4389c7){return new BPromise(function(_0x3898bc,_0x3cf639){return client[_0x8371('0x9')](_0x516885,_0x4389c7)[_0x8371('0xa')](function(_0x200daa){logger['info']('FaxApplication,\x20%s,\x20%s',_0x5eebe2,_0x8371('0xb'));logger[_0x8371('0xc')](_0x8371('0xd'),_0x5eebe2,_0x8371('0xb'),JSON[_0x8371('0xe')](_0x200daa));if(_0x200daa[_0x8371('0xf')]){if(_0x200daa[_0x8371('0xf')]['code']===0x1f4){logger[_0x8371('0xf')](_0x8371('0x10'),_0x5eebe2,_0x200daa[_0x8371('0xf')]['message']);return _0x3cf639(_0x200daa[_0x8371('0xf')][_0x8371('0x11')]);}logger['error'](_0x8371('0x10'),_0x5eebe2,_0x200daa['error'][_0x8371('0x11')]);return _0x3898bc(_0x200daa[_0x8371('0xf')][_0x8371('0x11')]);}else{logger[_0x8371('0x12')](_0x8371('0x10'),_0x5eebe2,_0x8371('0xb'));_0x3898bc(_0x200daa['result'][_0x8371('0x11')]);}})['catch'](function(_0x399207){logger[_0x8371('0xf')](_0x8371('0x10'),_0x5eebe2,_0x399207);_0x3cf639(_0x399207);});});}exports['UpdateFaxApplication']=function(_0x4ed92f){var _0x1c897c=this;return new Promise(function(_0x77ffaf,_0x57fde3){return db['FaxApplication']['update'](_0x4ed92f[_0x8371('0x13')],{'raw':_0x4ed92f[_0x8371('0x14')]?_0x4ed92f[_0x8371('0x14')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4ed92f[_0x8371('0x14')]?_0x4ed92f[_0x8371('0x14')][_0x8371('0x15')]||null:null,'attributes':_0x4ed92f[_0x8371('0x14')]?_0x4ed92f['options'][_0x8371('0x16')]||null:null,'limit':_0x4ed92f[_0x8371('0x14')]?_0x4ed92f[_0x8371('0x14')][_0x8371('0x17')]||null:null})['then'](function(_0x41d7c3){logger[_0x8371('0x12')](_0x8371('0x18'),_0x4ed92f);logger[_0x8371('0xc')](_0x8371('0x18'),_0x4ed92f,JSON[_0x8371('0xe')](_0x41d7c3));_0x77ffaf(_0x41d7c3);})[_0x8371('0x19')](function(_0x278821){logger['error'](_0x8371('0x18'),_0x278821[_0x8371('0x11')],_0x4ed92f);_0x57fde3(_0x1c897c['error'](0x1f4,_0x278821[_0x8371('0x11')]));});});};
\ No newline at end of file