From b6a7a1e6d5dcd4ce73ebc641883b315cc29c5ff9 Mon Sep 17 00:00:00 2001 From: Ryan Stafford Date: Sun, 7 Jul 2024 17:38:26 -0400 Subject: [PATCH] read_post error --- routes.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/routes.go b/routes.go index daace83..a2ed869 100644 --- a/routes.go +++ b/routes.go @@ -1406,7 +1406,9 @@ func UserOp(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { _, err := state.Client.MarkPostAsRead(context.Background(), post) if err != nil { fmt.Println(err) - } else if r.FormValue("xhr") != "" { + w.WriteHeader(http.StatusBadRequest) + } + if r.FormValue("xhr") != "" { w.Write([]byte{}) return }