feat(medusa/product-export-strategy): Implement the Product export strategy (#1688)

This commit is contained in:
Adrien de Peretti
2022-06-22 23:42:31 +02:00
committed by GitHub
parent 0e34800573
commit 7b09b8c36c
26 changed files with 2017 additions and 106 deletions
@@ -17,15 +17,14 @@ export const simpleBatchJobFactory = async (
): Promise<BatchJob> => {
const manager = connection.manager
const job = manager.create(BatchJob, {
const job = manager.create<BatchJob>(BatchJob, {
id: data.id,
status: data.status ?? BatchJobStatus.CREATED,
awaiting_confirmation_at: data.awaiting_confirmation_at ?? null,
completed_at: data.completed_at ?? null,
type: data.type ?? "test-job",
created_by: data.created_by ?? null,
context: data.context ?? {},
})
return await manager.save(job)
return await manager.save<BatchJob>(job)
}