~alanpearce/searchix

442345898802e93b0b884fd0f1c3492e08c34049 — Alan Pearce 4 months ago 5a2d54d
fix: extra data after error parsing query string
1 files changed, 2 insertions(+), 0 deletions(-)

M internal/server/mux.go
M internal/server/mux.go => internal/server/mux.go +2 -0
@@ 107,6 107,8 @@ func NewMux(
					page, err = strconv.ParseUint(pg, 10, 64)
					if err != nil || page == 0 {
						errorHandler(w, r, "Bad query string", http.StatusBadRequest)

						return
					}
				}
				results, err := index.Search(ctx, source, qs, (page-1)*search.ResultsPerPage)