Skip to content

feat: add PUT /api/v2/users/:user-id/suspend endpoint #1154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 26, 2022
Prev Previous commit
Next Next commit
fix: generated status types
  • Loading branch information
BrunoQuaresma committed Apr 26, 2022
commit e9a343452b024bd2b0bd9a03605ba31b401cc8cc
2 changes: 1 addition & 1 deletion coderd/database/databasefake/databasefake.go
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@ func (q *fakeQuerier) InsertUser(_ context.Context, arg database.InsertUserParam
CreatedAt: arg.CreatedAt,
UpdatedAt: arg.UpdatedAt,
Username: arg.Username,
Status: database.UserStatusTypeActive,
Status: database.UserStatusActive,
}
q.users = append(q.users, user)
return user, nil
Expand Down
2 changes: 1 addition & 1 deletion coderd/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ func (api *api) putUserSuspend(rw http.ResponseWriter, r *http.Request) {

suspendedUser, err := api.Database.UpdateUserStatus(r.Context(), database.UpdateUserStatusParams{
ID: user.ID,
Status: database.UserStatusTypeSuspended,
Status: database.UserStatusSuspended,
UpdatedAt: database.Now(),
})

Expand Down