File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,11 @@ impl RequestContext {
169169 InternalProjectConfig { id : Some ( id) } ;
170170 }
171171
172+ pub fn remove_project_id ( & mut self ) {
173+ * self . project_internal . as_mut ( ) . unwrap ( ) . as_mut ( ) . unwrap ( ) =
174+ InternalProjectConfig { id : None } ;
175+ }
176+
172177 pub fn save_local_internal ( & mut self ) -> Result < ( ) > {
173178 self . project_internal . as_ref ( ) . unwrap ( ) . save ( ) ?;
174179
Original file line number Diff line number Diff line change @@ -2028,7 +2028,7 @@ impl Shuttle {
20282028 Ok ( ( ) )
20292029 }
20302030
2031- async fn project_delete ( & self , no_confirm : bool ) -> Result < ( ) > {
2031+ async fn project_delete ( & mut self , no_confirm : bool ) -> Result < ( ) > {
20322032 let client = self . client . as_ref ( ) . unwrap ( ) ;
20332033 let pid = self . ctx . project_id ( ) ;
20342034
@@ -2064,6 +2064,9 @@ impl Shuttle {
20642064
20652065 let res = client. delete_project ( pid) . await ?. into_inner ( ) ;
20662066
2067+ self . ctx . remove_project_id ( ) ;
2068+ self . ctx . save_local_internal ( ) ?;
2069+
20672070 println ! ( "{res}" ) ;
20682071
20692072 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments