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)