refactor to share downloading code across all formats

This commit is contained in:
Jaiwanth
2021-06-25 11:16:59 +05:30
parent 91b8b2ac5a
commit 3718826e94
7 changed files with 83 additions and 118 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ import PlainTextExporter from "./PlainTextExport";
export enum exportFormats {
HTML = "HTML",
JSON = "JSON",
LOGS = "LOGS",
PLAIN_TEXT = "PLAIN_TEXT",
}
export enum exportTypes {
@@ -36,7 +36,7 @@ const exportConversationalHistory = async (
case exportFormats.JSON:
await new JSONExporter(room, exportType, exportOptions).export();
break;
case exportFormats.LOGS:
case exportFormats.PLAIN_TEXT:
await new PlainTextExporter(room, exportType, exportOptions).export();
break;
}