Manage display of book covers

This commit is contained in:
2025-10-28 18:35:36 +01:00
parent 8b8eee8210
commit b4df375e4c
20 changed files with 257 additions and 353 deletions

View File

@@ -18,6 +18,10 @@ type HttpError struct {
}
func ValidateId(db *gorm.DB, id uint, value any) error {
//id = 0 means empty id, so no check
if id == 0 {
return nil
}
record := map[string]any{}
result := db.Model(value).First(&record, id)
if result.Error == nil {