Skip to content

Commit 2da0145

Browse files
fix: use safe connection properties endpoint for rename instead of PUT /connection
PUT /connection/:id was overwriting credentials and breaking connections. Now uses PUT /connection/properties/:id with company_name which only updates display settings without touching connection credentials. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent cf36573 commit 2da0145

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

frontend/src/app/components/connections-list/hosted-database-rename-dialog/hosted-database-rename-dialog.component.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,8 @@ export class HostedDatabaseRenameDialogComponent {
4040

4141
this.saving = true;
4242
try {
43-
// Fetch the current connection to preserve all fields
44-
const res = await firstValueFrom(
45-
this._http.get<any>(`/connection/one/${this.data.connectionId}`),
46-
);
47-
const connection = res.connection;
48-
connection.title = title;
49-
5043
await firstValueFrom(
51-
this._http.put(`/connection/${this.data.connectionId}`, connection),
44+
this._connectionsService.updateConnectionSettings(this.data.connectionId, { company_name: title }),
5245
);
5346
this._connectionsService.fetchConnections().subscribe();
5447
this._dialogRef.close(title);

0 commit comments

Comments
 (0)