Skip to content

Commit cfa74ab

Browse files
author
Lasim
committed
refactor(backend): simplify deleteInstallation logging and remove checks
1 parent 1444a10 commit cfa74ab

File tree

1 file changed

+3
-34
lines changed

1 file changed

+3
-34
lines changed

services/backend/src/services/mcpInstallationService.ts

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -417,31 +417,10 @@ export class McpInstallationService {
417417

418418
async deleteInstallation(installationId: string, teamId: string): Promise<boolean> {
419419
this.logger.debug({
420-
operation: 'delete_installation_debug',
420+
operation: 'delete_installation',
421421
installationId,
422-
teamId,
423-
installationIdLength: installationId.length,
424-
teamIdLength: teamId.length
425-
}, 'Starting deletion with exact parameters');
426-
427-
// Check if record exists before deletion
428-
const existsBefore = await this.db
429-
.select({ id: mcpServerInstallations.id, team_id: mcpServerInstallations.team_id })
430-
.from(mcpServerInstallations)
431-
.where(
432-
and(
433-
eq(mcpServerInstallations.id, installationId),
434-
eq(mcpServerInstallations.team_id, teamId)
435-
)
436-
);
437-
438-
this.logger.debug({
439-
operation: 'delete_installation_before',
440-
installationId,
441-
teamId,
442-
recordsFound: existsBefore.length,
443-
foundRecords: existsBefore
444-
}, 'Records found before deletion');
422+
teamId
423+
}, 'Deleting MCP installation');
445424

446425
const result = await this.db
447426
.delete(mcpServerInstallations)
@@ -455,16 +434,6 @@ export class McpInstallationService {
455434
// Handle different property names between SQLite (changes) and Turso (rowsAffected)
456435
const deleted = (result.changes || result.rowsAffected || 0) > 0;
457436

458-
this.logger.info({
459-
operation: 'delete_installation_result',
460-
installationId,
461-
teamId,
462-
changes: result.changes,
463-
rowsAffected: result.rowsAffected,
464-
deleted,
465-
result: result
466-
}, 'Delete operation completed');
467-
468437
return deleted;
469438
}
470439

0 commit comments

Comments
 (0)