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/markers/markersget.go | 2 +- internal/api/client/markers/markerspost.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/api/client/markers') diff --git a/internal/api/client/markers/markersget.go b/internal/api/client/markers/markersget.go index eb403dcc6..9f4fc4270 100644 --- a/internal/api/client/markers/markersget.go +++ b/internal/api/client/markers/markersget.go @@ -84,7 +84,7 @@ func (m *Module) MarkersGETHandler(c *gin.Context) { return } - c.JSON(http.StatusOK, marker) + apiutil.JSON(c, http.StatusOK, marker) } // parseMarkerNames turns a list of strings into a set of valid marker timeline names, or returns an error. diff --git a/internal/api/client/markers/markerspost.go b/internal/api/client/markers/markerspost.go index 3167becac..8fe40c798 100644 --- a/internal/api/client/markers/markerspost.go +++ b/internal/api/client/markers/markerspost.go @@ -106,5 +106,5 @@ func (m *Module) MarkersPOSTHandler(c *gin.Context) { return } - c.JSON(http.StatusOK, marker) + apiutil.JSON(c, http.StatusOK, marker) } -- cgit v1.2.3