From 9f6533ece90c6b528dd0af6f1b6dec4a7fa2fa3b Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Thu, 19 Jul 2018 19:27:05 -0700 Subject: Compress JSON, CSS and Javascript responses --- api/user.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'api/user.go') diff --git a/api/user.go b/api/user.go index 4e5fa828..b880ba30 100644 --- a/api/user.go +++ b/api/user.go @@ -22,7 +22,7 @@ func (c *Controller) CurrentUser(w http.ResponseWriter, r *http.Request) { return } - json.OK(w, user) + json.OK(w, r, user) } // CreateUser is the API handler to create a new user. @@ -119,7 +119,7 @@ func (c *Controller) Users(w http.ResponseWriter, r *http.Request) { } users.UseTimezone(ctx.UserTimezone()) - json.OK(w, users) + json.OK(w, r, users) } // UserByID is the API handler to fetch the given user by the ID. @@ -148,7 +148,7 @@ func (c *Controller) UserByID(w http.ResponseWriter, r *http.Request) { } user.UseTimezone(ctx.UserTimezone()) - json.OK(w, user) + json.OK(w, r, user) } // UserByUsername is the API handler to fetch the given user by the username. @@ -171,7 +171,7 @@ func (c *Controller) UserByUsername(w http.ResponseWriter, r *http.Request) { return } - json.OK(w, user) + json.OK(w, r, user) } // RemoveUser is the API handler to remove an existing user. -- cgit v1.2.3