From b02a882ed7d6779e74ee6f8c3c93fe10f778037a Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Sat, 31 Aug 2024 11:27:03 +0200 Subject: [PATCH] Fixed small bug that used article.Link instead of correct path for article deletion --- cmd/frontend/articles.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/frontend/articles.go b/cmd/frontend/articles.go index 9066702..2ad8a66 100644 --- a/cmd/frontend/articles.go +++ b/cmd/frontend/articles.go @@ -572,7 +572,8 @@ func ReviewArticleForDeletion(c *b.Config, db *b.DB, s *b.CookieStore) http.Hand return } - contentBytes, err := os.ReadFile(article.Link) + articleAbsName := fmt.Sprint(c.ArticleDir, "/", article.ID, ".md") + contentBytes, err := os.ReadFile(articleAbsName) if err != nil { log.Println(err) http.Error(w, err.Error(), http.StatusInternalServerError)