Skip to content

Commit

Permalink
fixed CSV data import including files and categories
Browse files Browse the repository at this point in the history
  • Loading branch information
SteRiccio committed Nov 14, 2024
1 parent ff6b1a6 commit c1754e1
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions server/modules/dataExport/service/DataExportJob/DataExportJob.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ import CategoriesExportJob from './jobs/CategoriesExportJob'
import FilesExportJob from './jobs/FilesExportJob'
import ZipCreationJob from './jobs/ZipCreationJob'

const createInternalJobs = ({ includeCategories, includeFiles }) => [
new CSVDataExtractionJob(),
...(includeCategories ? [new CategoriesExportJob()] : []),
...(includeFiles ? [new FilesExportJob()] : []),
new ZipCreationJob(),
]
const createInternalJobs = (params) => {
const { options } = params ?? {}
const { includeCategories, includeFiles } = options ?? {}
return [
new CSVDataExtractionJob(),
...(includeCategories ? [new CategoriesExportJob()] : []),
...(includeFiles ? [new FilesExportJob()] : []),
new ZipCreationJob(),
]
}

export default class DataExportJob extends Job {
constructor(params) {
Expand Down

0 comments on commit c1754e1

Please sign in to comment.