From 38ef7b80d5fa301c620e3ad8f2819185b51c5f3e Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Fri, 13 Sep 2024 05:12:57 +0200 Subject: [PATCH] Cleanup --- cmd/backend/articles.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/backend/articles.go b/cmd/backend/articles.go index dcc15ea..8f947c7 100644 --- a/cmd/backend/articles.go +++ b/cmd/backend/articles.go @@ -269,14 +269,13 @@ func (db *DB) AddArticleToCurrentIssue(id int64) error { func (db *DB) DeleteArticle(id int64) error { articlesTagsQuery := "DELETE FROM articles_tags WHERE article_id = ?" + articlesQuery := "DELETE FROM articles WHERE id = ?" _, err := db.Exec(articlesTagsQuery, id) if err != nil { return fmt.Errorf("error deleting article %v from DB: %v", id, err) } - articlesQuery := "DELETE FROM articles WHERE id = ?" - _, err = db.Exec(articlesQuery, id) if err != nil { return fmt.Errorf("error deleting article %v from DB: %v", id, err)