mirror of
https://github.com/Kugelschieber/marvinblum.git
synced 2026-01-18 14:50:27 +00:00
Don't count hits on article that were not found, centered images.
This commit is contained in:
4
main.go
4
main.go
@@ -89,7 +89,6 @@ func serveBlogPage() http.HandlerFunc {
|
||||
|
||||
func serveBlogArticle() http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
tracker.Hit(r)
|
||||
vars := mux.Vars(r)
|
||||
slug := strings.Split(vars["slug"], "-")
|
||||
|
||||
@@ -105,6 +104,9 @@ func serveBlogArticle() http.HandlerFunc {
|
||||
return
|
||||
}
|
||||
|
||||
// track the hit if the article was found, otherwise we don't care
|
||||
tracker.Hit(r)
|
||||
|
||||
tplCache.Render(w, "article.html", struct {
|
||||
Title string
|
||||
Content template.HTML
|
||||
|
||||
Reference in New Issue
Block a user