diff options
author | 2018-07-19 19:27:05 -0700 | |
---|---|---|
committer | 2018-07-19 19:27:05 -0700 | |
commit | 9f6533ece90c6b528dd0af6f1b6dec4a7fa2fa3b (patch) | |
tree | 59349657a1d5a700abab38332d4e7240533ab4d3 /api/user.go | |
parent | a291d8a38b40569fdd1f00125ca0b29e4b9264f2 (diff) | |
download | v2-9f6533ece90c6b528dd0af6f1b6dec4a7fa2fa3b.tar.gz v2-9f6533ece90c6b528dd0af6f1b6dec4a7fa2fa3b.tar.zst v2-9f6533ece90c6b528dd0af6f1b6dec4a7fa2fa3b.zip |
Compress JSON, CSS and Javascript responses
Diffstat (limited to 'api/user.go')
-rw-r--r-- | api/user.go | 8 |
1 files changed, 4 insertions, 4 deletions
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. |