From c094472cfe6f24f5bfd2aadaf353c31a525c55db Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Tue, 14 Feb 2023 14:20:30 +0200 Subject: [PATCH] fix: export failing because stream closed (#3104) --- src/lib/routes/admin-api/export-import.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/lib/routes/admin-api/export-import.ts b/src/lib/routes/admin-api/export-import.ts index bc83272c40..08692f9f9f 100644 --- a/src/lib/routes/admin-api/export-import.ts +++ b/src/lib/routes/admin-api/export-import.ts @@ -66,13 +66,6 @@ class ExportImportController extends Controller { exportResultSchema.$id, serializeDates(data), ); - - const timestamp = this.getFormattedDate(Date.now()); - if (query.downloadFile) { - res.attachment(`export-${timestamp}.json`); - } - - res.json(data); } private getFormattedDate(millis: number): string {