From 3dbe12b562a58d64321b43f4ef194b3e264ab1c5 Mon Sep 17 00:00:00 2001 From: Robert Janetzko Date: Sat, 30 Apr 2022 08:29:33 +0000 Subject: [PATCH] bugfix search --- backend/server/search.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/server/search.go b/backend/server/search.go index d64a0d7..01cd283 100644 --- a/backend/server/search.go +++ b/backend/server/search.go @@ -54,8 +54,9 @@ func (h searchHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } func seachMap[T model.Named](s string, input map[int]T, output []SearchResult, baseUrl string) []SearchResult { + s = strings.ToLower(s) for id, v := range input { - if strings.Contains(v.Name(), s) { + if strings.Contains(strings.ToLower(v.Name()), s) { output = append(output, SearchResult{ Label: util.Title(v.Name()), Value: fmt.Sprintf("%s/%d", baseUrl, id),