Skip to content
Snippets Groups Projects

Release to master

2 files
+ 10
2
Compare changes
  • Side-by-side
  • Inline

Files

+ 5
1
@@ -130,7 +130,11 @@ func (dh *DataHandler) DeleteGrdfConsentById(w http.ResponseWriter, r *http.Requ
var consent = GrdfConsent{}
err = dh.sqlClient.First(&consent, "id = ?", id).Error
if err != nil {
http.Error(w, "couldn't find consent", http.StatusInternalServerError)
if errors.Is(err, gorm.ErrRecordNotFound) {
http.Error(w, "consent not found", http.StatusNotFound)
return
}
http.Error(w, "error while finding consent", http.StatusInternalServerError)
log.Println(err.Error())
return
}
Loading