read_post error

This commit is contained in:
Ryan Stafford 2024-07-07 17:38:26 -04:00
parent f63975f949
commit b6a7a1e6d5

View file

@ -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
}