mirror of
https://github.com/balzack/databag.git
synced 2025-02-15 21:19:16 +00:00
query caps only when using them in response
This commit is contained in:
parent
7f2b788208
commit
ac728373b7
@ -50,10 +50,6 @@ func GetChannels(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
video := getBoolConfigValue(CNFEnableVideo, true);
|
|
||||||
audio := getBoolConfigValue(CNFEnableAudio, true);
|
|
||||||
image := getBoolConfigValue(CNFEnableImage, true);
|
|
||||||
|
|
||||||
response := []*Channel{}
|
response := []*Channel{}
|
||||||
tokenType := ParamTokenType(r)
|
tokenType := ParamTokenType(r)
|
||||||
if tokenType == APPTokenAgent {
|
if tokenType == APPTokenAgent {
|
||||||
@ -84,6 +80,9 @@ func GetChannels(w http.ResponseWriter, r *http.Request) {
|
|||||||
if channelRevisionSet {
|
if channelRevisionSet {
|
||||||
response = append(response, getChannelRevisionModel(&slot, true))
|
response = append(response, getChannelRevisionModel(&slot, true))
|
||||||
} else if slot.Channel != nil {
|
} else if slot.Channel != nil {
|
||||||
|
video := getBoolConfigValue(CNFEnableVideo, true);
|
||||||
|
audio := getBoolConfigValue(CNFEnableAudio, true);
|
||||||
|
image := getBoolConfigValue(CNFEnableImage, true);
|
||||||
response = append(response, getChannelModel(&slot, true, true, image, audio, video))
|
response = append(response, getChannelModel(&slot, true, true, image, audio, video))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -128,6 +127,9 @@ func GetChannels(w http.ResponseWriter, r *http.Request) {
|
|||||||
if channelRevisionSet {
|
if channelRevisionSet {
|
||||||
response = append(response, getChannelRevisionModel(&slot, shared))
|
response = append(response, getChannelRevisionModel(&slot, shared))
|
||||||
} else if shared {
|
} else if shared {
|
||||||
|
video := getBoolConfigValue(CNFEnableVideo, true);
|
||||||
|
audio := getBoolConfigValue(CNFEnableAudio, true);
|
||||||
|
image := getBoolConfigValue(CNFEnableImage, true);
|
||||||
response = append(response, getChannelModel(&slot, true, false, image, audio, video))
|
response = append(response, getChannelModel(&slot, true, false, image, audio, video))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user