Add pagination for booksearch

This commit is contained in:
2025-11-11 00:32:00 +01:00
parent 87f6daef18
commit 6b2038aeec
10 changed files with 185 additions and 50 deletions

View File

@@ -39,6 +39,9 @@ func Setup(config *config.Config) *gin.Engine {
r.GET("/search/:searchterm", func(c *gin.Context) {
routes.GetSearchBooksHandler(appcontext.AppContext{C: c, Db: db, I18n: bundle, Config: config})
})
r.GET("/search/:searchterm/count", func(c *gin.Context) {
routes.GetSearchBooksCountHandler(appcontext.AppContext{C: c, Db: db, I18n: bundle, Config: config})
})
r.GET("/book/:id", func(c *gin.Context) {
routes.GetBookHandler(appcontext.AppContext{C: c, Db: db, I18n: bundle, Config: config})
})