Update the auth in streamCmdParams on every request. It wasn't picking up updates

This commit is contained in:
Isaac Connor 2021-03-13 12:12:20 -05:00
parent 0bb4afa0bc
commit 478d11e6f2
1 changed files with 5 additions and 5 deletions

View File

@ -13,11 +13,6 @@ function MonitorStream(monitorData) {
request: 'stream',
connkey: this.connKey
};
if ( auth_hash ) {
this.streamCmdParms.auth = auth_hash;
} else if ( auth_relay ) {
this.streamCmdParms.auth_relay = '';
}
this.type = monitorData.type;
this.refresh = monitorData.refresh;
this.start = function(delay) {
@ -208,6 +203,11 @@ function MonitorStream(monitorData) {
if ( this.type != 'WebSite' ) {
this.streamCmdReq = function(streamCmdParms) {
if ( auth_hash ) {
this.streamCmdParms.auth = auth_hash;
} else if ( auth_relay ) {
this.streamCmdParms.auth_relay = '';
}
$j.ajaxSetup({timeout: AJAX_TIMEOUT});
$j.getJSON(this.url, streamCmdParms)
.done(this.getStreamCmdResponse.bind(this))