Let the article deletion logic happen entirely in the backend

This commit is contained in:
2024-12-27 10:40:34 +01:00
parent 7f85b60916
commit 82faacb9ec
4 changed files with 13 additions and 35 deletions

View File

@ -590,18 +590,6 @@ func PublishArticle(c *b.Config, db *b.DB, s *b.CookieStore) http.HandlerFunc {
return
}
if err = db.DeleteArticleContributors(oldArticle.ID); err != nil {
log.Println(err)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
if err = db.DeleteArticleAuthors(oldArticle.ID); err != nil {
log.Println(err)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
if err = db.DeleteArticle(oldArticle.ID); err != nil {
log.Println(err)
http.Error(w, err.Error(), http.StatusInternalServerError)