Simplified even more.

build-default-monitor-config-from-definitions
Ian Rubado 2020-04-06 16:33:38 -04:00
parent 2a22db2e55
commit 00a883f127
1 changed files with 1 additions and 6 deletions

View File

@ -712,11 +712,6 @@ module.exports = function(s,config,lang,app,io){
}else{
res.setHeader('Content-Type', 'application/json');
}
var streamtype = false;
if(req.query.streamtype){
//streamtype specified
streamtype = true;
}
req.fn=function(user){
if(user.permissions.get_monitors==="0"){
res.end(s.prettyPrint([]))
@ -751,7 +746,7 @@ module.exports = function(s,config,lang,app,io){
r.forEach(function(v,n){
var buildStreamURL = function(channelRow,type,channelNumber){
var streamURL
if(streamtype===true && req.query.streamtype != type){
if(req.query.streamtype && req.query.streamtype != type){
return
}
if(channelNumber){channelNumber = '/'+channelNumber}else{channelNumber=''}