Open Library search API

If nothing is found on the server, returns results from open library
API. Clicking on a book imports it.
This commit is contained in:
2025-12-30 18:13:11 +01:00
parent 4d901ccc02
commit 1bb841332c
18 changed files with 478 additions and 57 deletions

View File

@@ -66,6 +66,9 @@ func Setup(config *config.Config) *gin.Engine {
r.POST("/book", func(c *gin.Context) {
routes.PostBookHandler(appcontext.AppContext{C: c, Db: db, I18n: bundle, Config: config})
})
r.POST("/importbook", func(c *gin.Context) {
routes.PostImportBookHandler(appcontext.AppContext{C: c, Db: db, I18n: bundle, Config: config})
})
r.GET("/author/:id", func(c *gin.Context) {
routes.GetAuthorHandler(appcontext.AppContext{C: c, Db: db, I18n: bundle, Config: config})
})