Cleanup
This commit is contained in:
parent
c777a77824
commit
38ef7b80d5
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user