diff --git a/src/services/coder.ts b/src/services/coder.ts index a690166..f3ae462 100644 --- a/src/services/coder.ts +++ b/src/services/coder.ts @@ -109,12 +109,14 @@ export class CoderClient { async deleteWorkspace(workspaceId: string): Promise { const res = await fetch( - `${this.baseUrl}/api/v2/workspaces/${workspaceId}`, + `${this.baseUrl}/api/v2/workspaces/${workspaceId}/builds`, { - method: "DELETE", + method: "POST", headers: { + "Content-Type": "application/json", "Coder-Session-Token": this.token, }, + body: JSON.stringify({ transition: "delete" }), }, );