mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 05:36:05 +00:00
Merge branch 'main' into next
This commit is contained in:
commit
fe2a679132
@ -51,7 +51,9 @@ async function importXlsxAction(ctx: Context, next: Next) {
|
||||
explain: (ctx.request.body as any).explain,
|
||||
});
|
||||
|
||||
const importedCount = await importer.run();
|
||||
const importedCount = await importer.run({
|
||||
context: ctx,
|
||||
});
|
||||
|
||||
ctx.bodyMeta = { successCount: importedCount };
|
||||
ctx.body = ctx.bodyMeta;
|
||||
|
@ -30,6 +30,7 @@ type ImporterOptions = {
|
||||
|
||||
type RunOptions = {
|
||||
transaction?: Transaction;
|
||||
context?: any;
|
||||
};
|
||||
|
||||
export class XlsxImporter extends EventEmitter {
|
||||
@ -180,6 +181,7 @@ export class XlsxImporter extends EventEmitter {
|
||||
|
||||
await this.options.collection.repository.create({
|
||||
values: rowValues,
|
||||
context: options?.context,
|
||||
transaction,
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user