@@ -96,9 +96,6 @@ export const workspaceMachine = createMachine(
96
96
idle : {
97
97
tags : "loading" ,
98
98
} ,
99
- deleted : {
100
- tags : "deleted" ,
101
- } ,
102
99
gettingWorkspace : {
103
100
entry : [ "clearGetWorkspaceError" , "clearContext" ] ,
104
101
invoke : {
@@ -191,21 +188,6 @@ export const workspaceMachine = createMachine(
191
188
invoke : {
192
189
id : "deleteWorkspace" ,
193
190
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" ,
209
191
onDone : {
210
192
target : "idle" ,
211
193
actions : [ "assignBuild" , "refreshTimeline" ] ,
@@ -454,13 +436,6 @@ export const workspaceMachine = createMachine(
454
436
getWorkspace : async ( _ , event ) => {
455
437
return await API . getWorkspaceByOwnerAndName ( event . username , event . workspaceName , { include_deleted : true } )
456
438
} ,
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
- } ,
464
439
getTemplate : async ( context ) => {
465
440
if ( context . workspace ) {
466
441
return await API . getTemplate ( context . workspace . template_id )
0 commit comments