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/followrequests/authorize.go | 2 +- internal/api/client/followrequests/get.go | 2 +- internal/api/client/followrequests/reject.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/api/client/followrequests') diff --git a/internal/api/client/followrequests/authorize.go b/internal/api/client/followrequests/authorize.go index 707d3db26..406b54179 100644 --- a/internal/api/client/followrequests/authorize.go +++ b/internal/api/client/followrequests/authorize.go @@ -93,5 +93,5 @@ func (m *Module) FollowRequestAuthorizePOSTHandler(c *gin.Context) { return } - c.JSON(http.StatusOK, relationship) + apiutil.JSON(c, http.StatusOK, relationship) } diff --git a/internal/api/client/followrequests/get.go b/internal/api/client/followrequests/get.go index af2f3741c..40cdceaea 100644 --- a/internal/api/client/followrequests/get.go +++ b/internal/api/client/followrequests/get.go @@ -139,5 +139,5 @@ func (m *Module) FollowRequestGETHandler(c *gin.Context) { c.Header("Link", resp.LinkHeader) } - c.JSON(http.StatusOK, resp.Items) + apiutil.JSON(c, http.StatusOK, resp.Items) } diff --git a/internal/api/client/followrequests/reject.go b/internal/api/client/followrequests/reject.go index 6514a615e..a8189b78a 100644 --- a/internal/api/client/followrequests/reject.go +++ b/internal/api/client/followrequests/reject.go @@ -91,5 +91,5 @@ func (m *Module) FollowRequestRejectPOSTHandler(c *gin.Context) { return } - c.JSON(http.StatusOK, relationship) + apiutil.JSON(c, http.StatusOK, relationship) } -- cgit v1.3