feat: add workspace auditing (#3966)

This commit is contained in:
Colin Adler
2022-09-10 11:07:45 -05:00
committed by GitHub
parent 442df9e132
commit 29bac36816
4 changed files with 91 additions and 15 deletions
+2 -2
View File
@@ -183,7 +183,7 @@ func (c *Client) UpdateWorkspaceAutostart(ctx context.Context, id uuid.UUID, req
return xerrors.Errorf("update workspace autostart: %w", err)
}
defer res.Body.Close()
if res.StatusCode != http.StatusOK {
if res.StatusCode != http.StatusNoContent {
return readBodyAsError(res)
}
return nil
@@ -203,7 +203,7 @@ func (c *Client) UpdateWorkspaceTTL(ctx context.Context, id uuid.UUID, req Updat
return xerrors.Errorf("update workspace time until shutdown: %w", err)
}
defer res.Body.Close()
if res.StatusCode != http.StatusOK {
if res.StatusCode != http.StatusNoContent {
return readBodyAsError(res)
}
return nil