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

@@ -25,7 +25,7 @@ func ValidateId(db *gorm.DB, id uint, value any) error {
}
if errors.Is(result.Error, gorm.ErrRecordNotFound) {
return HttpError{
StatusCode: http.StatusBadRequest,
StatusCode: http.StatusNotFound,
Err: fmt.Errorf("Id %d could not be found for model %s", id, value),
}
} else {