diff options
| author | Shulhan <ms@kilabit.info> | 2021-03-04 12:43:14 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-03-04 12:43:14 +0700 |
| commit | c5ec00bb91744d00ef7a8fefb719f2e1a962c72c (patch) | |
| tree | ebd3a79d2507dedb7946a082b3b8beaacd88c7e9 /server.go | |
| parent | f0ce04a4dbb1fb41705afa93ba566a1587f2607c (diff) | |
| download | ciigo-c5ec00bb91744d00ef7a8fefb719f2e1a962c72c.tar.xz | |
all: update with latest share module
Diffstat (limited to 'server.go')
| -rw-r--r-- | server.go | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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) |
