Built motion from commit ecdc8e66766c75b1b08288b0ea13eb12d42606b4. Version 3.0.0...
[motion-next.git] / server / services / ami / trigger / urlforward / index.js
index 6095a26..a6543f8 100644 (file)
@@ -1 +1 @@
-const a1148_0x1fc5=['headers','data7','util','isNil','data1','number','trigger','data6','catch','parse','render','exec','POST','request-promise-native','data2','%s\x20%s\x20sending\x20request\x20with\x20following\x20options:\x20%s','error','PUT','GET','data5',',\x20request\x20body:\x20','DELETE','stringify','%s\x20%s\x20succeeded\x20with\x20status:\x20%d\x20and\x20response:\x20%s','then','object','format','mustache','%s\x20%s\x20failed\x20with\x20status:\x20%d\x20and\x20error:\x20%s\x20%s','lodash','body','stack','message','toUpperCase','info'];(function(_0x39fd52,_0x1fc516){const _0x5bd25a=function(_0x263e26){while(--_0x263e26){_0x39fd52['push'](_0x39fd52['shift']());}};_0x5bd25a(++_0x1fc516);}(a1148_0x1fc5,0x187));const a1148_0x5bd2=function(_0x39fd52,_0x1fc516){_0x39fd52=_0x39fd52-0x0;let _0x5bd25a=a1148_0x1fc5[_0x39fd52];return _0x5bd25a;};const _0x32c743=a1148_0x5bd2;'use strict';const rp=require(_0x32c743('0x7')),util=require(_0x32c743('0x1f')),_=require(_0x32c743('0x17')),Mustache=require(_0x32c743('0x15')),logger=require('../../../../config/logger')(_0x32c743('0x0'));exports[_0x32c743('0x5')]=function(_0x263e26,_0x3a2f41){const _0x439f06=_0x32c743;let _0x363731,_0x1c375b;const _0x48cc64={'method':_0x263e26[_0x439f06('0x21')][_0x439f06('0x1b')](),'uri':Mustache[_0x439f06('0x4')](_0x263e26[_0x439f06('0x8')],_0x3a2f41),'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x263e26['data5'])===_0x439f06('0x22')&&parseInt(_0x263e26['data5'])>=0x1&&parseInt(_0x263e26['data5'])<=0xa?parseInt(_0x263e26[_0x439f06('0xd')])*0x3e8:0x5*0x3e8};try{_0x48cc64[_0x439f06('0x1d')]=_0x263e26[_0x439f06('0x1')]?JSON['parse'](Mustache[_0x439f06('0x4')](_0x263e26[_0x439f06('0x1')],_0x3a2f41)):{};}catch(_0x3da40f){logger[_0x439f06('0xa')](_0x3da40f[_0x439f06('0x19')]);}switch(_0x263e26[_0x439f06('0x21')]['toUpperCase']()){case _0x439f06('0xc'):case _0x439f06('0xf'):_0x363731=null,_0x48cc64['qs']=_0x3a2f41;break;case _0x439f06('0x6'):case _0x439f06('0xb'):if(_0x263e26[_0x439f06('0x1e')])try{_0x363731=JSON[_0x439f06('0x3')](Mustache[_0x439f06('0x4')](_0x263e26['data7'],_0x3a2f41)),_0x48cc64[_0x439f06('0x18')]=_0x363731;}catch(_0x3dfe03){logger['error'](_0x3dfe03['stack']),logger[_0x439f06('0xa')]('body\x20has\x20been\x20passed\x20to\x20URLforward\x20in\x20a\x20wrong\x20format');}else _0x363731=_0x3a2f41,_0x48cc64[_0x439f06('0x18')]=_0x363731;break;}logger['info'](util[_0x439f06('0x14')](_0x439f06('0x9'),_0x263e26[_0x439f06('0x21')],_0x263e26[_0x439f06('0x8')],JSON[_0x439f06('0x10')](_0x48cc64))),rp(_0x48cc64)[_0x439f06('0x12')](function(_0x1083be){const _0x68b281=_0x439f06;_0x363731=!_[_0x68b281('0x20')](_0x363731)?_0x68b281('0xe')+_0x363731:'',_0x1c375b=typeof _0x1083be[_0x68b281('0x18')]===_0x68b281('0x13')?JSON[_0x68b281('0x10')](_0x1083be['body']):_0x1083be['body'],logger[_0x68b281('0x1c')](util[_0x68b281('0x14')](_0x68b281('0x11'),_0x263e26[_0x68b281('0x21')],_0x263e26[_0x68b281('0x8')],_0x1083be['statusCode'],_0x1c375b));})[_0x439f06('0x2')](function(_0x109560){const _0x43a618=_0x439f06;logger['error'](util[_0x43a618('0x14')](_0x43a618('0x16'),_0x263e26[_0x43a618('0x21')],_0x263e26[_0x43a618('0x8')],_0x109560['statusCode'],_0x109560['name'],_0x109560[_0x43a618('0x1a')]));});};
\ No newline at end of file
+const a1148_0x1f0a=['message','data7','then','isNil','body\x20has\x20been\x20passed\x20to\x20URLforward\x20in\x20a\x20wrong\x20format','error','POST','data1','data6',',\x20request\x20body:\x20','../../../../config/logger','stack','name','exec','%s\x20%s\x20sending\x20request\x20with\x20following\x20options:\x20%s','PUT','object','toUpperCase','data2','trigger','statusCode','body','info','%s\x20%s\x20succeeded\x20with\x20status:\x20%d\x20and\x20response:\x20%s','number','format','parse','GET','headers','render','stringify','lodash','data5'];(function(_0x653635,_0x1f0aca){const _0x51517e=function(_0x3ca465){while(--_0x3ca465){_0x653635['push'](_0x653635['shift']());}};_0x51517e(++_0x1f0aca);}(a1148_0x1f0a,0x115));const a1148_0x5151=function(_0x653635,_0x1f0aca){_0x653635=_0x653635-0x0;let _0x51517e=a1148_0x1f0a[_0x653635];return _0x51517e;};const _0x409957=a1148_0x5151;'use strict';const rp=require('request-promise-native'),util=require('util'),_=require(_0x409957('0x12')),Mustache=require('mustache'),logger=require(_0x409957('0x1e'))(_0x409957('0x6'));exports[_0x409957('0x0')]=function(_0x3ca465,_0x14dea6){const _0x26e951=_0x409957;let _0x2d9b16,_0x3b2f30;const _0x37afb7={'method':_0x3ca465[_0x26e951('0x1b')][_0x26e951('0x4')](),'uri':Mustache['render'](_0x3ca465[_0x26e951('0x5')],_0x14dea6),'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x3ca465[_0x26e951('0x13')])===_0x26e951('0xb')&&parseInt(_0x3ca465[_0x26e951('0x13')])>=0x1&&parseInt(_0x3ca465['data5'])<=0xa?parseInt(_0x3ca465[_0x26e951('0x13')])*0x3e8:0x5*0x3e8};try{_0x37afb7[_0x26e951('0xf')]=_0x3ca465[_0x26e951('0x1c')]?JSON[_0x26e951('0xd')](Mustache[_0x26e951('0x10')](_0x3ca465[_0x26e951('0x1c')],_0x14dea6)):{};}catch(_0x1ca844){logger['error'](_0x1ca844[_0x26e951('0x1f')]);}switch(_0x3ca465[_0x26e951('0x1b')][_0x26e951('0x4')]()){case _0x26e951('0xe'):case'DELETE':_0x2d9b16=null,_0x37afb7['qs']=_0x14dea6;break;case _0x26e951('0x1a'):case _0x26e951('0x2'):if(_0x3ca465['data7'])try{_0x2d9b16=JSON[_0x26e951('0xd')](Mustache[_0x26e951('0x10')](_0x3ca465[_0x26e951('0x15')],_0x14dea6)),_0x37afb7[_0x26e951('0x8')]=_0x2d9b16;}catch(_0x131ff3){logger[_0x26e951('0x19')](_0x131ff3[_0x26e951('0x1f')]),logger[_0x26e951('0x19')](_0x26e951('0x18'));}else _0x2d9b16=_0x14dea6,_0x37afb7[_0x26e951('0x8')]=_0x2d9b16;break;}logger[_0x26e951('0x9')](util[_0x26e951('0xc')](_0x26e951('0x1'),_0x3ca465[_0x26e951('0x1b')],_0x3ca465[_0x26e951('0x5')],JSON[_0x26e951('0x11')](_0x37afb7))),rp(_0x37afb7)[_0x26e951('0x16')](function(_0x300ac3){const _0x4b1ef9=_0x26e951;_0x2d9b16=!_[_0x4b1ef9('0x17')](_0x2d9b16)?_0x4b1ef9('0x1d')+_0x2d9b16:'',_0x3b2f30=typeof _0x300ac3[_0x4b1ef9('0x8')]===_0x4b1ef9('0x3')?JSON[_0x4b1ef9('0x11')](_0x300ac3[_0x4b1ef9('0x8')]):_0x300ac3[_0x4b1ef9('0x8')],logger[_0x4b1ef9('0x9')](util[_0x4b1ef9('0xc')](_0x4b1ef9('0xa'),_0x3ca465[_0x4b1ef9('0x1b')],_0x3ca465[_0x4b1ef9('0x5')],_0x300ac3[_0x4b1ef9('0x7')],_0x3b2f30));})['catch'](function(_0x117571){const _0x343355=_0x26e951;logger[_0x343355('0x19')](util[_0x343355('0xc')]('%s\x20%s\x20failed\x20with\x20status:\x20%d\x20and\x20error:\x20%s\x20%s',_0x3ca465['data1'],_0x3ca465[_0x343355('0x5')],_0x117571[_0x343355('0x7')],_0x117571[_0x343355('0x20')],_0x117571[_0x343355('0x14')]));});};
\ No newline at end of file