mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: use rw.WriteHeader to write responses without bodies (#13870)
This commit is contained in:
@@ -927,9 +927,7 @@ func (api *API) putWorkspaceDormant(rw http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// If the workspace is already in the desired state do nothing!
|
||||
if workspace.DormantAt.Valid == req.Dormant {
|
||||
httpapi.Write(ctx, rw, http.StatusNotModified, codersdk.Response{
|
||||
Message: "Nothing to do!",
|
||||
})
|
||||
rw.WriteHeader(http.StatusNotModified)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user