aboutsummaryrefslogtreecommitdiff
path: root/sklad/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'sklad/main.go')
-rw-r--r--sklad/main.go15
1 files changed, 9 insertions, 6 deletions
diff --git a/sklad/main.go b/sklad/main.go
index 1a9442a..9df1fd5 100644
--- a/sklad/main.go
+++ b/sklad/main.go
@@ -157,12 +157,15 @@ func handleSearch(w http.ResponseWriter, r *http.Request) {
}
query := r.FormValue("q")
- _ = query
-
- // TODO: Query the database for exact matches and fulltext.
- // - Will want to show the full path from the root "" container.
-
- params := struct{}{}
+ params := struct {
+ Query string
+ Series []*Series
+ Containers []*Container
+ }{
+ Query: query,
+ Series: dbSearchSeries(query),
+ Containers: dbSearchContainers(query),
+ }
executeTemplate("search.tmpl", w, &params)
}