Use updated auth_hash when sending alarm requests

This commit is contained in:
Isaac Connor 2021-04-09 18:33:32 -04:00
parent d9dc61265d
commit 492a352bed
1 changed files with 4 additions and 7 deletions

View File

@ -442,9 +442,6 @@ function statusCmdQuery() {
if ( monitorType != 'WebSite' ) {
var alarmCmdParms = 'view=request&request=alarm&id='+monitorId;
if ( auth_hash ) {
alarmCmdParms += '&auth='+auth_hash;
}
var alarmCmdReq = new Request.JSON( {
url: monitorUrl,
method: 'get',
@ -461,22 +458,22 @@ function getAlarmCmdResponse(respObj, respText) {
}
function cmdDisableAlarms() {
alarmCmdReq.send(alarmCmdParms+"&command=disableAlarms");
alarmCmdReq.send(alarmCmdParms+auth_relay+"&command=disableAlarms");
}
function cmdEnableAlarms() {
alarmCmdReq.send(alarmCmdParms+"&command=enableAlarms");
alarmCmdReq.send(alarmCmdParms+auth_relay+"&command=enableAlarms");
}
function cmdForceAlarm() {
alarmCmdReq.send(alarmCmdParms+"&command=forceAlarm");
alarmCmdReq.send(alarmCmdParms+auth_relay+"&command=forceAlarm");
if ( window.event ) {
window.event.preventDefault();
}
}
function cmdCancelForcedAlarm() {
alarmCmdReq.send(alarmCmdParms+"&command=cancelForcedAlarm");
alarmCmdReq.send(alarmCmdParms+auth_relay+"&command=cancelForcedAlarm");
if ( window.event ) {
window.event.preventDefault();
}