mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 12:39:17 +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{}
|
||||
tokenType := ParamTokenType(r)
|
||||
if tokenType == APPTokenAgent {
|
||||
@ -84,6 +80,9 @@ func GetChannels(w http.ResponseWriter, r *http.Request) {
|
||||
if channelRevisionSet {
|
||||
response = append(response, getChannelRevisionModel(&slot, true))
|
||||
} 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))
|
||||
}
|
||||
}
|
||||
@ -128,6 +127,9 @@ func GetChannels(w http.ResponseWriter, r *http.Request) {
|
||||
if channelRevisionSet {
|
||||
response = append(response, getChannelRevisionModel(&slot, 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))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user