Remove deleted article file when deleting article
This commit is contained in:
parent
222b791e90
commit
edb448413b
@ -620,6 +620,12 @@ func DeleteArticle(c *b.Config, db *b.DB, s *b.CookieStore) http.HandlerFunc {
|
||||
return
|
||||
}
|
||||
|
||||
if err = os.Remove(fmt.Sprint(c.ArticleDir, "/", id, ".md")); err != nil {
|
||||
log.Println(err)
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
feed, err := b.GenerateRSS(c, db)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user