fix: return http 204 on test notification (#16651)

This PR changes the API response for `/api/v2/notifications/test`
endpoint to HTTP 204 / No Content.
This commit is contained in:
Marcin Tojek
2025-02-21 13:54:29 +01:00
committed by GitHub
parent d50e846747
commit fcc9b05d29
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -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
}