Skip to content

Commit 57f5efd

Browse files
connection list: update list on RA hosted db delete
1 parent 369e550 commit 57f5efd

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

frontend/src/app/components/hosted-databases/hosted-databases.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { Title } from '@angular/platform-browser';
88
import posthog from 'posthog-js';
99
import { FoundHostedDatabase } from 'src/app/models/hosted-database';
1010
import { CompanyService } from 'src/app/services/company.service';
11+
import { ConnectionsService } from 'src/app/services/connections.service';
1112
import { HostedDatabaseService } from 'src/app/services/hosted-database.service';
1213

1314
import { UserService } from 'src/app/services/user.service';
@@ -24,6 +25,7 @@ import { HostedDatabaseResetPasswordDialogComponent } from './hosted-database-re
2425
})
2526
export class HostedDatabasesComponent implements OnInit {
2627
private _hostedDatabaseService = inject(HostedDatabaseService);
28+
private _connectionsService = inject(ConnectionsService);
2729
private _userService = inject(UserService);
2830
private _company = inject(CompanyService);
2931
private _dialog = inject(MatDialog);
@@ -56,6 +58,7 @@ export class HostedDatabasesComponent implements OnInit {
5658
dialogRef.afterClosed().subscribe(async (action) => {
5759
if (action === 'delete') {
5860
posthog.capture('Hosted Databases: database deleted successfully');
61+
this._connectionsService.invalidateConnections();
5962
await this._loadDatabases();
6063
}
6164
});

frontend/src/app/services/connections.service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ export class ConnectionsService {
6868

6969
public cast = this.connectionsSubject.asObservable();
7070

71+
invalidateConnections(): void {
72+
this.connectionsSubject.next(null);
73+
}
74+
7175
constructor(
7276
private _http: HttpClient,
7377
private router: Router,

0 commit comments

Comments
 (0)