From 84e4919e59508a7a332acda9fdf0913ffe741c7f Mon Sep 17 00:00:00 2001 From: Cipher Vance Date: Sat, 15 Nov 2025 13:29:53 -0600 Subject: [PATCH] update docstring --- internal/handlers/newsletter.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/handlers/newsletter.go b/internal/handlers/newsletter.go index 744862d..72e6f74 100644 --- a/internal/handlers/newsletter.go +++ b/internal/handlers/newsletter.go @@ -16,8 +16,10 @@ func SendUpdateGet(c *gin.Context) { // SendUpdatePost handles POST requests to submit a newsletter update. // It reads "subject" and "body" from the form, calls email.SendUpdate(subject, body), -// and renders the "send_update.html" template with gin.H{"error": message} when sending fails -// or gin.H{"success": message} when sending succeeds, returning HTTP 200 in both cases. +//and renders the "send_update.html" template with gin.H{"error": message} on validation +// or email failures (returning HTTP 400 or 500 respectively), or gin.H{"success": message} +// on success (returning HTTP 200) + func SendUpdatePost(c *gin.Context) { subject := c.PostForm("subject") body := c.PostForm("body")