Add route to get a particular book

This commit is contained in:
2025-10-24 20:06:41 +02:00
parent a21add72ce
commit 873c3c89fa
11 changed files with 188 additions and 34 deletions

View File

@@ -29,6 +29,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})
})
r.GET("/book/:id", func(c *gin.Context) {
routes.GetBookHandler(appcontext.AppContext{C: c, Db: db, I18n: bundle})
})
r.POST("/book", func(c *gin.Context) {
routes.PostBookHandler(appcontext.AppContext{C: c, Db: db, I18n: bundle})
})