Collection: new widget to add book to collection

This commit is contained in:
2026-04-04 23:15:44 +02:00
parent c7abbfe4d4
commit 2552ba8e94
11 changed files with 279 additions and 16 deletions

View File

@@ -57,6 +57,9 @@ func ReturnErrorsAsJsonResponse(ac *appcontext.AppContext, err error) {
ac.C.JSON(httpError.StatusCode, gin.H{"error": httpError.Err.Error()})
return
}
if errors.Is(err, gorm.ErrRecordNotFound) {
ac.C.JSON(http.StatusNotFound, gin.H{"error": err.Error()})
}
ac.C.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
}