This commit is contained in:
mike12345567 2023-10-11 17:12:28 +01:00
parent cffb78e93b
commit b310d7c5a7
3 changed files with 9 additions and 3 deletions

View File

@ -387,7 +387,9 @@ export async function destroy(ctx: UserCtx) {
return tableToDelete
}
export async function bulkImport(ctx: UserCtx<BulkImportRequest, BulkImportResponse>) {
export async function bulkImport(
ctx: UserCtx<BulkImportRequest, BulkImportResponse>
) {
const table = await sdk.tables.getTable(ctx.params.tableId)
const { rows } = ctx.request.body
const schema = table.schema

View File

@ -99,7 +99,9 @@ export async function destroy(ctx: UserCtx) {
builderSocket?.emitTableDeletion(ctx, deletedTable)
}
export async function bulkImport(ctx: UserCtx<BulkImportRequest, BulkImportResponse>) {
export async function bulkImport(
ctx: UserCtx<BulkImportRequest, BulkImportResponse>
) {
const tableId = ctx.params.tableId
let tableBefore = await sdk.tables.getTable(tableId)
let tableAfter = await pickApi({ tableId }).bulkImport(ctx)

View File

@ -208,7 +208,9 @@ export async function destroy(ctx: any) {
return tableToDelete
}
export async function bulkImport(ctx: UserCtx<BulkImportRequest, BulkImportResponse>) {
export async function bulkImport(
ctx: UserCtx<BulkImportRequest, BulkImportResponse>
) {
const table = await sdk.tables.getTable(ctx.params.tableId)
const { rows, identifierFields } = ctx.request.body
await handleDataImport(ctx.user, table, rows, identifierFields)