fix: added import and export types (#4411)

This commit is contained in:
Jack Kavanagh 2022-01-26 00:29:56 +01:00 committed by GitHub
parent 7d3526940e
commit 7e1bdfc66f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View File

@ -113,7 +113,7 @@ export async function exportRequestsHAR(
}
const data = await har.exportHar(harRequests);
trackSegmentEvent(SegmentEvent.dataExport);
trackSegmentEvent(SegmentEvent.dataExport, { type: 'har' });
return JSON.stringify(data, null, '\t');
}
@ -247,7 +247,7 @@ export async function exportRequestsData(
delete d.type;
return d;
});
trackSegmentEvent(SegmentEvent.dataExport);
trackSegmentEvent(SegmentEvent.dataExport, { type: format });
if (format.toLowerCase() === 'yaml') {
return YAML.stringify(data);

View File

@ -321,7 +321,7 @@ export async function importRaw(
}
await db.flushChanges();
trackSegmentEvent(SegmentEvent.dataImport);
trackSegmentEvent(SegmentEvent.dataImport, { type: resultsType.id });
const importRequest: ImportResult = {
source: resultsType && typeof resultsType.id === 'string' ? resultsType.id : 'unknown',
summary: importedDocs,

View File

@ -111,7 +111,6 @@ class GitSyncDropdown extends PureComponent<Props, State> {
}
async _handleOpen() {
trackSegmentEvent(SegmentEvent.vcsSyncStart, vcsSegmentEventProperties('git', 'setup'));
await this._refreshState();
}