aboutsummaryrefslogtreecommitdiff
path: root/backend/data.go
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-12-22 18:51:42 +0100
committerAnhgelus Morhtuuzh <william@herges.fr>2025-12-22 18:51:42 +0100
commit9ad7b0e67c90697893f188323a32590fbecd5a65 (patch)
tree41c8684a652e8fc5dbedb07bdde6404df4afb628 /backend/data.go
parentcbd5c09c5e1403709d4aabf91051443f147689e5 (diff)
fix(storage): does not store stats if request fails
Diffstat (limited to 'backend/data.go')
-rw-r--r--backend/data.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/backend/data.go b/backend/data.go
index 5bc5391..2f2e06d 100644
--- a/backend/data.go
+++ b/backend/data.go
@@ -111,6 +111,11 @@ func (d *data) handleGeneric(w http.ResponseWriter, r *http.Request, name string
if err != nil {
panic(err)
}
+ if name == "404" {
+ w.WriteHeader(http.StatusNotFound)
+ return
+ }
+ UpdateStats(r)
}
func (d *data) handleRSS(w http.ResponseWriter, r *http.Request, custom dataUsable) {