Built motion from commit cb845558.|2.6.34
[motion2.git] / server / api / faxApplication / faxApplication.rpc.js
index 166ff89..7fbb6d6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe8bc=['body','options','raw','where','attributes','limit','UpdateFaxApplication','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','then','info','request\x20sent','debug','FaxApplication,\x20%s,\x20%s,\x20%s','stringify','code','error','FaxApplication,\x20%s,\x20%s','message','catch','update'];(function(_0x2539c6,_0x5a0687){var _0x3bad35=function(_0xbc9a1e){while(--_0xbc9a1e){_0x2539c6['push'](_0x2539c6['shift']());}};_0x3bad35(++_0x5a0687);}(_0xe8bc,0x15c));var _0xce8b=function(_0x43fb7f,_0xed547a){_0x43fb7f=_0x43fb7f-0x0;var _0x29ce4c=_0xe8bc[_0x43fb7f];return _0x29ce4c;};'use strict';var _=require(_0xce8b('0x0'));var util=require(_0xce8b('0x1'));var moment=require('moment');var BPromise=require(_0xce8b('0x2'));var rs=require(_0xce8b('0x3'));var fs=require('fs');var Redis=require(_0xce8b('0x4'));var db=require(_0xce8b('0x5'))['db'];var utils=require(_0xce8b('0x6'));var logger=require(_0xce8b('0x7'))(_0xce8b('0x8'));var config=require('../../config/environment');var jayson=require(_0xce8b('0x9'));var client=jayson[_0xce8b('0xa')][_0xce8b('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4f4348,_0x3c8fcc,_0x29975e){return new BPromise(function(_0xca742f,_0x37e633){return client['request'](_0x4f4348,_0x29975e)[_0xce8b('0xc')](function(_0x5f03a2){logger[_0xce8b('0xd')]('FaxApplication,\x20%s,\x20%s',_0x3c8fcc,_0xce8b('0xe'));logger[_0xce8b('0xf')](_0xce8b('0x10'),_0x3c8fcc,_0xce8b('0xe'),JSON[_0xce8b('0x11')](_0x5f03a2));if(_0x5f03a2['error']){if(_0x5f03a2['error'][_0xce8b('0x12')]===0x1f4){logger[_0xce8b('0x13')](_0xce8b('0x14'),_0x3c8fcc,_0x5f03a2[_0xce8b('0x13')]['message']);return _0x37e633(_0x5f03a2['error'][_0xce8b('0x15')]);}logger[_0xce8b('0x13')](_0xce8b('0x14'),_0x3c8fcc,_0x5f03a2['error'][_0xce8b('0x15')]);return _0xca742f(_0x5f03a2[_0xce8b('0x13')][_0xce8b('0x15')]);}else{logger['info'](_0xce8b('0x14'),_0x3c8fcc,_0xce8b('0xe'));_0xca742f(_0x5f03a2['result'][_0xce8b('0x15')]);}})[_0xce8b('0x16')](function(_0x5d4453){logger[_0xce8b('0x13')](_0xce8b('0x14'),_0x3c8fcc,_0x5d4453);_0x37e633(_0x5d4453);});});}exports['UpdateFaxApplication']=function(_0x1f16f2){var _0x108e98=this;return new Promise(function(_0x2bf603,_0x32385a){return db['FaxApplication'][_0xce8b('0x17')](_0x1f16f2[_0xce8b('0x18')],{'raw':_0x1f16f2['options']?_0x1f16f2[_0xce8b('0x19')][_0xce8b('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1f16f2[_0xce8b('0x19')]?_0x1f16f2[_0xce8b('0x19')][_0xce8b('0x1b')]||null:null,'attributes':_0x1f16f2[_0xce8b('0x19')]?_0x1f16f2['options'][_0xce8b('0x1c')]||null:null,'limit':_0x1f16f2[_0xce8b('0x19')]?_0x1f16f2['options'][_0xce8b('0x1d')]||null:null})[_0xce8b('0xc')](function(_0x49e932){logger[_0xce8b('0xd')]('UpdateFaxApplication',_0x1f16f2);logger['debug'](_0xce8b('0x1e'),_0x1f16f2,JSON['stringify'](_0x49e932));_0x2bf603(_0x49e932);})[_0xce8b('0x16')](function(_0x310df0){logger[_0xce8b('0x13')](_0xce8b('0x1e'),_0x310df0[_0xce8b('0x15')],_0x1f16f2);_0x32385a(_0x108e98['error'](0x1f4,_0x310df0[_0xce8b('0x15')]));});});};
\ No newline at end of file
+var _0x7146=['where','attributes','info','UpdateFaxApplication','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','FaxApplication,\x20%s,\x20%s','request\x20sent','debug','FaxApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','FaxApplication','update','body','options','raw'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x7146,0x185));var _0x6714=function(_0x4565bf,_0x5ad9d6){_0x4565bf=_0x4565bf-0x0;var _0x5610ba=_0x7146[_0x4565bf];return _0x5610ba;};'use strict';var _=require(_0x6714('0x0'));var util=require(_0x6714('0x1'));var moment=require(_0x6714('0x2'));var BPromise=require('bluebird');var rs=require(_0x6714('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6714('0x4'))['db'];var utils=require(_0x6714('0x5'));var logger=require(_0x6714('0x6'))(_0x6714('0x7'));var config=require(_0x6714('0x8'));var jayson=require(_0x6714('0x9'));var client=jayson['client'][_0x6714('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x11063,_0x42f9ba,_0x4e6ee6){return new BPromise(function(_0x25cd8c,_0x238fd9){return client[_0x6714('0xb')](_0x11063,_0x4e6ee6)[_0x6714('0xc')](function(_0x230f8b){logger['info'](_0x6714('0xd'),_0x42f9ba,_0x6714('0xe'));logger[_0x6714('0xf')](_0x6714('0x10'),_0x42f9ba,_0x6714('0xe'),JSON[_0x6714('0x11')](_0x230f8b));if(_0x230f8b['error']){if(_0x230f8b[_0x6714('0x12')][_0x6714('0x13')]===0x1f4){logger['error']('FaxApplication,\x20%s,\x20%s',_0x42f9ba,_0x230f8b[_0x6714('0x12')][_0x6714('0x14')]);return _0x238fd9(_0x230f8b[_0x6714('0x12')][_0x6714('0x14')]);}logger[_0x6714('0x12')](_0x6714('0xd'),_0x42f9ba,_0x230f8b[_0x6714('0x12')]['message']);return _0x25cd8c(_0x230f8b['error']['message']);}else{logger['info'](_0x6714('0xd'),_0x42f9ba,_0x6714('0xe'));_0x25cd8c(_0x230f8b[_0x6714('0x15')][_0x6714('0x14')]);}})['catch'](function(_0x4438b7){logger[_0x6714('0x12')](_0x6714('0xd'),_0x42f9ba,_0x4438b7);_0x238fd9(_0x4438b7);});});}exports['UpdateFaxApplication']=function(_0x1a221e){var _0x1539da=this;return new Promise(function(_0x4c527e,_0x5a767c){return db[_0x6714('0x16')][_0x6714('0x17')](_0x1a221e[_0x6714('0x18')],{'raw':_0x1a221e[_0x6714('0x19')]?_0x1a221e['options'][_0x6714('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1a221e[_0x6714('0x19')]?_0x1a221e[_0x6714('0x19')][_0x6714('0x1b')]||null:null,'attributes':_0x1a221e[_0x6714('0x19')]?_0x1a221e[_0x6714('0x19')][_0x6714('0x1c')]||null:null,'limit':_0x1a221e[_0x6714('0x19')]?_0x1a221e[_0x6714('0x19')]['limit']||null:null})[_0x6714('0xc')](function(_0x5b4d09){logger[_0x6714('0x1d')](_0x6714('0x1e'),_0x1a221e);logger[_0x6714('0xf')](_0x6714('0x1e'),_0x1a221e,JSON[_0x6714('0x11')](_0x5b4d09));_0x4c527e(_0x5b4d09);})[_0x6714('0x1f')](function(_0x35a0a6){logger[_0x6714('0x12')](_0x6714('0x1e'),_0x35a0a6['message'],_0x1a221e);_0x5a767c(_0x1539da[_0x6714('0x12')](0x1f4,_0x35a0a6['message']));});});};
\ No newline at end of file