From 74700cc8034980334e7df466f313287a41d2b8a6 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Mon, 27 Nov 2023 14:00:57 +0000 Subject: [performance] http response encoding / writing improvements (#2374) --- internal/api/client/polls/polls_get.go | 2 +- internal/api/client/polls/polls_vote.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/api/client/polls') diff --git a/internal/api/client/polls/polls_get.go b/internal/api/client/polls/polls_get.go index 0b15c0ed1..fc89255e9 100644 --- a/internal/api/client/polls/polls_get.go +++ b/internal/api/client/polls/polls_get.go @@ -96,5 +96,5 @@ func (m *Module) PollGETHandler(c *gin.Context) { return } - c.JSON(http.StatusOK, poll) + apiutil.JSON(c, http.StatusOK, poll) } diff --git a/internal/api/client/polls/polls_vote.go b/internal/api/client/polls/polls_vote.go index e5281b3fc..0ab5ac20c 100644 --- a/internal/api/client/polls/polls_vote.go +++ b/internal/api/client/polls/polls_vote.go @@ -117,7 +117,7 @@ func (m *Module) PollVotePOSTHandler(c *gin.Context) { return } - c.JSON(http.StatusOK, poll) + apiutil.JSON(c, http.StatusOK, poll) } func bindChoices(c *gin.Context) ([]int, error) { -- cgit v1.3