about summary refs log tree commit diff stats
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/server/mux.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/server/mux.go b/internal/server/mux.go
index 27cd4bf..c5ba97a 100644
--- a/internal/server/mux.go
+++ b/internal/server/mux.go
@@ -7,6 +7,7 @@ import (
 	"io"
 	"log"
 	"log/slog"
+	"math"
 	"net/http"
 	"net/url"
 	"os"
@@ -163,7 +164,7 @@ func NewMux(
 						return
 					}
 
-					if page*search.ResultsPerPage > results.Total {
+					if page > uint64(math.Ceil(float64(results.Total)/search.ResultsPerPage)) {
 						errorHandler(w, r, "Not found", http.StatusNotFound)
 
 						return