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/auth/token.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'internal/api/auth/token.go') diff --git a/internal/api/auth/token.go b/internal/api/auth/token.go index 9787e9efc..cab9352fa 100644 --- a/internal/api/auth/token.go +++ b/internal/api/auth/token.go @@ -110,5 +110,11 @@ func (m *Module) TokenPOSTHandler(c *gin.Context) { c.Header("Cache-Control", "no-store") c.Header("Pragma", "no-cache") - c.JSON(http.StatusOK, token) + apiutil.EncodeJSONResponse( + c.Writer, + c.Request, + http.StatusOK, + apiutil.AppJSON, + token, + ) } -- cgit v1.2.3