Skip to content

Commit 132ed27

Browse files
committed
fix /users endpoint
1 parent 038ad91 commit 132ed27

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

coderd/users.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"slices"
1010

1111
"github.com/go-chi/chi/v5"
12-
"github.com/go-chi/render"
1312
"github.com/google/uuid"
1413
"golang.org/x/xerrors"
1514

@@ -273,8 +272,7 @@ func (api *API) users(rw http.ResponseWriter, r *http.Request) {
273272
organizationIDsByUserID[organizationIDsByMemberIDsRow.UserID] = organizationIDsByMemberIDsRow.OrganizationIDs
274273
}
275274

276-
render.Status(r, http.StatusOK)
277-
render.JSON(rw, r, codersdk.GetUsersResponse{
275+
httpapi.Write(ctx, rw, http.StatusOK, codersdk.GetUsersResponse{
278276
Users: convertUsers(users, organizationIDsByUserID),
279277
Count: int(userCount),
280278
})

0 commit comments

Comments
 (0)