Skip to content

Commit 13a8c43

Browse files
committed
♻️ refactor: updated codebase #2
1 parent f4eaff1 commit 13a8c43

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/handlers/common_handler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ func (h *CommonHandler) OnMessage(ctx *gin.Context) {
4444
ctx.JSON(response.StatusCode, response)
4545
return
4646
}
47-
h.wsSvc.BroadcastMessage(message)
48-
response.SetStatusCode(http.StatusOK).SetMessage("Message sent successfully")
47+
go h.wsSvc.BroadcastMessage(message)
48+
response.SetStatusCode(http.StatusOK).SetMessage("Message sent successfully").SetData(message)
4949
ctx.JSON(response.StatusCode, response)
5050
return
5151
}

0 commit comments

Comments
 (0)