Skip to content
Snippets Groups Projects
Commit 488958a3 authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

Merge branch 'dev' into 'master'

Release to master

See merge request !102
parents 928e425f 63f8e3f5
Branches
No related tags found
1 merge request!102Release to master
Pipeline #107672 failed
...@@ -130,7 +130,11 @@ func (dh *DataHandler) DeleteGrdfConsentById(w http.ResponseWriter, r *http.Requ ...@@ -130,7 +130,11 @@ func (dh *DataHandler) DeleteGrdfConsentById(w http.ResponseWriter, r *http.Requ
var consent = GrdfConsent{} var consent = GrdfConsent{}
err = dh.sqlClient.First(&consent, "id = ?", id).Error err = dh.sqlClient.First(&consent, "id = ?", id).Error
if err != nil { 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()) log.Println(err.Error())
return return
} }
......
...@@ -217,7 +217,11 @@ func (dh *DataHandler) DeleteSgeConsentById(w http.ResponseWriter, r *http.Reque ...@@ -217,7 +217,11 @@ func (dh *DataHandler) DeleteSgeConsentById(w http.ResponseWriter, r *http.Reque
var consent = SgeConsent{} var consent = SgeConsent{}
err = dh.sqlClient.First(&consent, "id = ?", id).Error err = dh.sqlClient.First(&consent, "id = ?", id).Error
if err != nil { 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()) log.Println(err.Error())
return return
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment