From 7d59b07fb9cd198691978a96b32075aceaed4a56 Mon Sep 17 00:00:00 2001 From: Marcin Tojek Date: Fri, 21 Feb 2025 13:11:41 +0100 Subject: [PATCH 1/2] fix: return http 204 on test notification --- coderd/notifications.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coderd/notifications.go b/coderd/notifications.go index 97cab982bdf20..812d8cd3e450b 100644 --- a/coderd/notifications.go +++ b/coderd/notifications.go @@ -210,7 +210,7 @@ func (api *API) postTestNotification(rw http.ResponseWriter, r *http.Request) { return } - httpapi.Write(ctx, rw, http.StatusOK, nil) + rw.WriteHeader(http.StatusNoContent) } // @Summary Get user notification preferences From 8817d7b0085673cc157ff4744aa533b408a3233f Mon Sep 17 00:00:00 2001 From: Marcin Tojek Date: Fri, 21 Feb 2025 13:19:31 +0100 Subject: [PATCH 2/2] fix --- codersdk/notifications.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/codersdk/notifications.go b/codersdk/notifications.go index 560499a67227f..ac5fe8e60bce1 100644 --- a/codersdk/notifications.go +++ b/codersdk/notifications.go @@ -200,10 +200,9 @@ func (c *Client) PostTestNotification(ctx context.Context) error { } defer res.Body.Close() - if res.StatusCode != http.StatusOK { + if res.StatusCode != http.StatusNoContent { return ReadBodyAsError(res) } - return nil } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy