Skip to content

Commit aa0101e

Browse files
committed
clean up x state
1 parent e48cc71 commit aa0101e

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

site/src/xServices/workspace/workspaceXService.ts

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@ export const workspaceMachine = createMachine(
9696
idle: {
9797
tags: "loading",
9898
},
99-
deleted: {
100-
tags: "deleted",
101-
},
10299
gettingWorkspace: {
103100
entry: ["clearGetWorkspaceError", "clearContext"],
104101
invoke: {
@@ -191,21 +188,6 @@ export const workspaceMachine = createMachine(
191188
invoke: {
192189
id: "deleteWorkspace",
193190
src: "deleteWorkspace",
194-
onDone: {
195-
target: "gettingDeletedWorkspace",
196-
actions: ["assignBuild", "refreshTimeline"],
197-
},
198-
onError: {
199-
target: "idle",
200-
actions: ["assignBuildError", "displayBuildError"],
201-
},
202-
},
203-
},
204-
gettingDeletedWorkspace: {
205-
entry: ["clearGetWorkspaceError", "clearContext"],
206-
invoke: {
207-
id: "getDeletedWorkspace",
208-
src: "getDeletedWorkspace",
209191
onDone: {
210192
target: "idle",
211193
actions: ["assignBuild", "refreshTimeline"],
@@ -454,13 +436,6 @@ export const workspaceMachine = createMachine(
454436
getWorkspace: async (_, event) => {
455437
return await API.getWorkspaceByOwnerAndName(event.username, event.workspaceName, { include_deleted: true })
456438
},
457-
getDeletedWorkspace: async (context) => {
458-
if (context.workspace) {
459-
return await API.getWorkspace(context.workspace.id, { deleted: true })
460-
} else {
461-
throw Error("Cannot get workspace without id")
462-
}
463-
},
464439
getTemplate: async (context) => {
465440
if (context.workspace) {
466441
return await API.getTemplate(context.workspace.template_id)

0 commit comments

Comments
 (0)