- Notifications
You must be signed in to change notification settings - Fork926
chore: revert status code change for delete users endpoint#14168
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -513,7 +513,7 @@ func (api *API) postUser(rw http.ResponseWriter, r *http.Request) { | ||
// @Security CoderSessionToken | ||
// @Tags Users | ||
// @Param user path string true "User ID, name, or me" | ||
// @Success200 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. also this should probably specify | ||
// @Router /users/{user} [delete] | ||
func (api *API) deleteUser(rw http.ResponseWriter, r *http.Request) { | ||
ctx := r.Context() | ||
@@ -588,7 +588,9 @@ func (api *API) deleteUser(rw http.ResponseWriter, r *http.Request) { | ||
} | ||
} | ||
httpapi.Write(ctx, rw, http.StatusOK, codersdk.Response{ | ||
Message: "User has been deleted!", | ||
}) | ||
} | ||
// Returns the parameterized user requested. All validation | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -309,7 +309,7 @@ func (c *Client) DeleteUser(ctx context.Context, id uuid.UUID) error { | ||
return err | ||
} | ||
defer res.Body.Close() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. did a version get released with the other status code? should this be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. you are right. I didn't think about that when I reverted. Let me throw up another 🤦 | ||
if res.StatusCode != http.StatusOK { | ||
return ReadBodyAsError(res) | ||
} | ||
return nil | ||
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.