Add [] to the labels in csv

This commit is contained in:
Hongbo Wu
2023-03-03 08:35:11 +08:00
parent 0204e27aee
commit 9a46e935d9

View File

@ -238,7 +238,7 @@ export function integrationsServiceRouter() {
// write the list of urls, state and labels to the stream
const csvData = retrievedData.map((page) => {
const { url, state, labels } = page
return [url, state, labels?.join(',')].join(',')
return [url, state, `[${labels?.join(',') || ''}]`].join(',')
})
writeStream.write(csvData.join('\n'))