aboutsummaryrefslogtreecommitdiff
path: root/server.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2021-03-04 12:43:14 +0700
committerShulhan <ms@kilabit.info>2021-03-04 12:43:14 +0700
commitc5ec00bb91744d00ef7a8fefb719f2e1a962c72c (patch)
treeebd3a79d2507dedb7946a082b3b8beaacd88c7e9 /server.go
parentf0ce04a4dbb1fb41705afa93ba566a1587f2607c (diff)
downloadciigo-c5ec00bb91744d00ef7a8fefb719f2e1a962c72c.tar.xz
all: update with latest share module
Diffstat (limited to 'server.go')
-rw-r--r--server.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/server.go b/server.go
index 3855eed..e787b30 100644
--- a/server.go
+++ b/server.go
@@ -8,7 +8,6 @@ import (
"bytes"
"fmt"
"html/template"
- "net/http"
"strings"
"github.com/shuLhan/share/lib/debug"
@@ -112,13 +111,11 @@ func (srv *server) start() (err error) {
return nil
}
-func (srv *server) onSearch(res http.ResponseWriter, req *http.Request, reqBody []byte) (
- resBody []byte, err error,
-) {
+func (srv *server) onSearch(epr *libhttp.EndpointRequest) (resBody []byte, err error) {
var bufSearch, buf bytes.Buffer
logp := "onSearch"
- q := req.Form.Get("q")
+ q := epr.HttpRequest.Form.Get("q")
results := srv.http.Memfs.Search(strings.Fields(q), 0)
err = srv.htmlg.tmplSearch.Execute(&bufSearch, results)