Built motion from commit 994c64e1.|2.6.1
[motion2.git] / server / services / ami / client.js
index 4d37343..3222240 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaa74=['client','Request','then','debug','rpc','memberReport','error','message','exports','jayson/promise','../../config/logger','ami'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xaa74,0xa5));var _0x4aa7=function(_0x27616e,_0x322a2c){_0x27616e=_0x27616e-0x0;var _0x8df0c8=_0xaa74[_0x27616e];return _0x8df0c8;};'use strict';var jayson=require(_0x4aa7('0x0'));var BPromise=require('bluebird');var logger=require(_0x4aa7('0x1'))(_0x4aa7('0x2'));var client=jayson[_0x4aa7('0x3')]['http']({'port':0x2329});client[_0x4aa7('0x4')]=function(_0x2bfd26,_0x3da9b0){return new BPromise(function(_0x4287df,_0x48ffc2){return client['request'](_0x2bfd26,_0x3da9b0)[_0x4aa7('0x5')](function(_0x539c45){logger[_0x4aa7('0x6')](_0x4aa7('0x7'),_0x4aa7('0x8'),_0x2bfd26,_0x3da9b0,_0x539c45);if(_0x539c45[_0x4aa7('0x9')]){logger['error']('rpc',_0x4aa7('0x8'),_0x2bfd26,_0x539c45['error'][_0x4aa7('0xa')],_0x3da9b0);return _0x48ffc2(_0x539c45['error'][_0x4aa7('0xa')]);}else{return _0x4287df(_0x539c45['result']);}})['catch'](function(_0x39d98f){logger[_0x4aa7('0x9')](_0x4aa7('0x7'),_0x4aa7('0x8'),_0x2bfd26,_0x39d98f,_0x3da9b0);return _0x48ffc2(_0x39d98f);});});};module[_0x4aa7('0xb')]=client;
\ No newline at end of file
+var _0xac4a=['ami','client','http','then','debug','memberReport','error','message','result','catch','rpc','jayson/promise','bluebird','../../config/logger'];(function(_0x382e89,_0x4768c0){var _0x3a1318=function(_0x79e1ce){while(--_0x79e1ce){_0x382e89['push'](_0x382e89['shift']());}};_0x3a1318(++_0x4768c0);}(_0xac4a,0x13f));var _0xaac4=function(_0x3aef4b,_0x2276bb){_0x3aef4b=_0x3aef4b-0x0;var _0x420458=_0xac4a[_0x3aef4b];return _0x420458;};'use strict';var jayson=require(_0xaac4('0x0'));var BPromise=require(_0xaac4('0x1'));var logger=require(_0xaac4('0x2'))(_0xaac4('0x3'));var client=jayson[_0xaac4('0x4')][_0xaac4('0x5')]({'port':0x2329});client['Request']=function(_0x58626e,_0x2af0f6){return new BPromise(function(_0x2a5762,_0x32d34c){return client['request'](_0x58626e,_0x2af0f6)[_0xaac4('0x6')](function(_0x53d03a){logger[_0xaac4('0x7')]('rpc',_0xaac4('0x8'),_0x58626e,_0x2af0f6,_0x53d03a);if(_0x53d03a[_0xaac4('0x9')]){logger['error']('rpc',_0xaac4('0x8'),_0x58626e,_0x53d03a['error'][_0xaac4('0xa')],_0x2af0f6);return _0x32d34c(_0x53d03a['error']['message']);}else{return _0x2a5762(_0x53d03a[_0xaac4('0xb')]);}})[_0xaac4('0xc')](function(_0x38d1d0){logger[_0xaac4('0x9')](_0xaac4('0xd'),'memberReport',_0x58626e,_0x38d1d0,_0x2af0f6);return _0x32d34c(_0x38d1d0);});});};module['exports']=client;
\ No newline at end of file