1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-12-08 17:38:08 +00:00

Add the search form to the top bar

Also change /primitive-search/ syntax
This commit is contained in:
Timur Ismagilov
2021-07-12 22:01:12 +05:00
parent 532e5d62b2
commit ba0b12a803
4 changed files with 242 additions and 235 deletions

View File

@@ -16,9 +16,9 @@ func initSearch() {
func handlerPrimitiveSearch(w http.ResponseWriter, rq *http.Request) {
util.PrepareRq(rq)
_ = rq.ParseForm()
var (
// It just so happened that this function does what we need! Sorry for party rocking.
query = util.HyphaNameFromRq(rq, "primitive-search")
query = rq.FormValue("q")
u = user.FromRequest(rq)
)
_, _ = io.WriteString(