From 889a56a9f9c4e0f306f1640ec08296d9cc67e405 Mon Sep 17 00:00:00 2001 From: "n.nakhostin" Date: Mon, 20 Oct 2025 11:57:37 +0330 Subject: [PATCH] Update Notification Handler to Send Notifications Asynchronously - Modified the Send method in the NotificationHandler to dispatch notifications asynchronously by using a goroutine, improving responsiveness and allowing the handler to return immediately after initiating the send process. - This change enhances the user experience by not blocking the request while the notification is being sent, ensuring smoother operation of the API. --- internal/notification/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/notification/handler.go b/internal/notification/handler.go index 315f573..ede2ad4 100644 --- a/internal/notification/handler.go +++ b/internal/notification/handler.go @@ -50,7 +50,7 @@ func (h *NotificationHandler) Send(c echo.Context) error { } // Send notification - h.service.Send(context.Background(), &req) + go h.service.Send(context.Background(), &req) return response.Created(c, nil, "Notification sent successfully") }