Skip to content

A self-hosted dashboard that puts all your feeds in one place

Add support for bool in query params fields

Svilen Markovc0bdf1551dfd
diff --git a/internal/glance/config-fields.go b/internal/glance/config-fields.go
index 966b366..e2ece3f 100644
--- a/internal/glance/config-fields.go
+++ b/internal/glance/config-fields.go
@@ -231,12 +231,15 @@ func (q *queryParametersField) UnmarshalYAML(node *yaml.Node) error {
*q = make(queryParametersField)
+ // TODO: refactor the duplication in the switch cases if any more types get added
for key, value := range decoded {
switch v := value.(type) {
case string:
(*q)[key] = []string{v}
case int, int8, int16, int32, int64, float32, float64:
(*q)[key] = []string{fmt.Sprintf("%v", v)}
+ case bool:
+ (*q)[key] = []string{fmt.Sprintf("%t", v)}
case []string:
(*q)[key] = append((*q)[key], v...)
case []any: