Instead of having entire articles in the RSS feed, items now contain just a link

This commit is contained in:
2024-08-30 21:20:29 +02:00
parent 4a11e1a497
commit 3f1b18c29f
18 changed files with 349 additions and 108 deletions

View File

@ -10,15 +10,17 @@ import (
func ServeImage(c *b.Config, s *b.CookieStore) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
if tokenIsVerified(w, r, c) {
absFilepath, err := filepath.Abs(c.PicsDir)
if err != nil {
log.Println(err)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
http.ServeFile(w, r, absFilepath+"/"+r.PathValue("pic"))
if !tokenIsVerified(w, r, c) {
return
}
absFilepath, err := filepath.Abs(c.PicsDir)
if err != nil {
log.Println(err)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
http.ServeFile(w, r, absFilepath+"/"+r.PathValue("pic"))
}
}