Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdb94b30

Browse files
stirbyEmyrkaslilac
authored
fix: patch known issues in 2.14.1 (#14207)
* chore: revert status code change for delete users endpoint (#14168)Revert from#13870(cherry picked from commitb80d995)* chore: delete user codersdk to support status code regression (#14173)* chore: delete user codersdk to support status code regression* Update codersdk/users.goCo-authored-by: Kayla Washburn-Love <mckayla@hey.com>---------Co-authored-by: Kayla Washburn-Love <mckayla@hey.com>(cherry picked from commitb55a7a8)* fix: add template editor to /templates/:templateName route group (#14206)(cherry picked from commitd0feb70)---------Co-authored-by: Steven Masley <Emyrk@users.noreply.github.com>Co-authored-by: Kayla Washburn-Love <mckayla@hey.com>
1 parenta0411a3 commitdb94b30

File tree

6 files changed

+18
-10
lines changed

6 files changed

+18
-10
lines changed

‎coderd/apidoc/docs.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/apidoc/swagger.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/users.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ func (api *API) postUser(rw http.ResponseWriter, r *http.Request) {
513513
// @Security CoderSessionToken
514514
// @Tags Users
515515
// @Param user path string true "User ID, name, or me"
516-
// @Success204
516+
// @Success200
517517
// @Router /users/{user} [delete]
518518
func (api*API)deleteUser(rw http.ResponseWriter,r*http.Request) {
519519
ctx:=r.Context()
@@ -588,7 +588,9 @@ func (api *API) deleteUser(rw http.ResponseWriter, r *http.Request) {
588588
}
589589
}
590590

591-
rw.WriteHeader(http.StatusNoContent)
591+
httpapi.Write(ctx,rw,http.StatusOK, codersdk.Response{
592+
Message:"User has been deleted!",
593+
})
592594
}
593595

594596
// Returns the parameterized user requested. All validation

‎codersdk/users.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,9 @@ func (c *Client) DeleteUser(ctx context.Context, id uuid.UUID) error {
309309
returnerr
310310
}
311311
deferres.Body.Close()
312-
ifres.StatusCode!=http.StatusNoContent {
312+
// Check for a 200 or a 204 response. 2.14.0 accidentally included a 204 response,
313+
// which was a breaking change, and reverted in 2.14.1.
314+
ifres.StatusCode!=http.StatusOK&&res.StatusCode!=http.StatusNoContent {
313315
returnReadBodyAsError(res)
314316
}
315317
returnnil

‎docs/api/users.md

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎site/src/router.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,10 @@ export const router = createBrowserRouter(
472472

473473
{/* Pages that don't have the dashboard layout */}
474474
<Routepath="/:username/:workspace"element={<WorkspacePage/>}/>
475+
<Route
476+
path="/templates/:template/versions/:version/edit"
477+
element={<TemplateVersionEditorPage/>}
478+
/>
475479
<Route
476480
path="/templates/:organization/:template/versions/:version/edit"
477481
element={<TemplateVersionEditorPage/>}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp