Archived
Template
1
0

Adds search pagination

This commit is contained in:
uberswe
2022-01-29 12:31:01 +01:00
parent 1b52e86444
commit b9a591a178
4 changed files with 68 additions and 4 deletions

View File

@ -107,6 +107,8 @@ func Run() {
// We want to handle both POST and GET requests on the /search route. We define both but use the same function to handle the requests.
r.GET("/search", controller.Search)
r.POST("/search", controller.Search)
r.Any("/search/:page", controller.Search)
r.Any("/search/:page/:query", controller.Search)
// We define our 404 handler for when a page can not be found
r.NoRoute(controller.NoRoute)