Cleanup linter warnings
This commit is contained in:
@@ -448,7 +448,10 @@ func SetS3Configuration(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
|
||||
data.SetS3Config(newS3Config.Value)
|
||||
if err := data.SetS3Config(newS3Config.Value); err != nil {
|
||||
controllers.WriteSimpleResponse(w, false, err.Error())
|
||||
return
|
||||
}
|
||||
controllers.WriteSimpleResponse(w, true, "storage configuration changed")
|
||||
}
|
||||
|
||||
@@ -514,7 +517,10 @@ func SetChatDisabled(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
data.SetChatDisabled(configValue.Value.(bool))
|
||||
if err := data.SetChatDisabled(configValue.Value.(bool)); err != nil {
|
||||
controllers.WriteSimpleResponse(w, false, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
controllers.WriteSimpleResponse(w, true, "chat disabled status updated")
|
||||
}
|
||||
@@ -567,7 +573,10 @@ func SetCustomStyles(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
data.SetCustomStyles(customStyles.Value.(string))
|
||||
if err := data.SetCustomStyles(customStyles.Value.(string)); err != nil {
|
||||
controllers.WriteSimpleResponse(w, false, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
controllers.WriteSimpleResponse(w, true, "custom styles updated")
|
||||
}
|
||||
|
||||
@@ -5,11 +5,8 @@ import (
|
||||
"sort"
|
||||
|
||||
"github.com/owncast/owncast/core/data"
|
||||
"github.com/owncast/owncast/models"
|
||||
)
|
||||
|
||||
type variants []models.StreamOutputVariant
|
||||
|
||||
type variantsResponse struct {
|
||||
Name string `json:"name"`
|
||||
Index int `json:"index"`
|
||||
|
||||
Reference in New Issue
Block a user