Fixed small bug in ServeArticle where it was looking at the link to read the file
This commit is contained in:
parent
ab6b9b9a4f
commit
bc58b1be44
@ -35,7 +35,8 @@ func ServeArticle(c *b.Config, db *b.DB) http.HandlerFunc {
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user