From c5ec00bb91744d00ef7a8fefb719f2e1a962c72c Mon Sep 17 00:00:00 2001 From: Shulhan Date: Thu, 4 Mar 2021 12:43:14 +0700 Subject: all: update with latest share module --- server.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'server.go') 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) -- cgit v1.3