Skip to content

Commit

Permalink
feat(notifications): do not judge returned http code from webhook calls
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbitfly committed Oct 24, 2024
1 parent 660c901 commit 5395522
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions backend/pkg/notification/sending.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,6 @@ func SendTestWebhookNotification(ctx context.Context, userId types.UserId, webho
return fmt.Errorf("error sending discord webhook request: %w", err)
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return fmt.Errorf("error sending discord webhook request: %v", resp.Status)
}
} else {
// send a test webhook notification with the text "TEST" in the post body
reqBody := new(bytes.Buffer)
Expand All @@ -504,9 +501,6 @@ func SendTestWebhookNotification(ctx context.Context, userId types.UserId, webho
return fmt.Errorf("error sending webhook request: %w", err)
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return fmt.Errorf("error sending webhook request: %v", resp.Status)
}
}
return nil
}

0 comments on commit 5395522

Please sign in to comment.