From 0dd62b6a4f9a9b5f0baabb0112f9276ecb8daf97 Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 5 Mar 2026 11:22:35 +0100 Subject: [PATCH] fix(migration): remove unused error fields from PreviewResult ErrorCount and Errors fields were never populated by PreviewImport, making the API contract misleading. Remove them from both the Go struct and the TypeScript interface. --- frontend/src/services/migrator/csvMigration.ts | 2 -- pkg/modules/migration/csv/csv.go | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/frontend/src/services/migrator/csvMigration.ts b/frontend/src/services/migrator/csvMigration.ts index e87be2bab..ecbc26561 100644 --- a/frontend/src/services/migrator/csvMigration.ts +++ b/frontend/src/services/migrator/csvMigration.ts @@ -64,8 +64,6 @@ export interface PreviewTask { export interface PreviewResult { tasks: PreviewTask[] total_rows: number - error_count: number - errors?: string[] } export interface MigrationStatus { diff --git a/pkg/modules/migration/csv/csv.go b/pkg/modules/migration/csv/csv.go index 7818b3ced..415700666 100644 --- a/pkg/modules/migration/csv/csv.go +++ b/pkg/modules/migration/csv/csv.go @@ -144,10 +144,8 @@ type PreviewTask struct { // PreviewResult contains preview data before import type PreviewResult struct { - Tasks []PreviewTask `json:"tasks"` - TotalRows int `json:"total_rows"` - ErrorCount int `json:"error_count"` - Errors []string `json:"errors,omitempty"` + Tasks []PreviewTask `json:"tasks"` + TotalRows int `json:"total_rows"` } // stripBOM removes the UTF-8 BOM from the beginning of a reader