Updated cleanExportRows import
This commit is contained in:
parent
4479c2477c
commit
2bf724b9b3
|
@ -20,7 +20,7 @@ import {
|
||||||
Datasource,
|
Datasource,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
|
||||||
const { cleanExportRows } = require("../row/utils")
|
const { cleanExportRows } = require("./utils")
|
||||||
|
|
||||||
export async function handleRequest(
|
export async function handleRequest(
|
||||||
operation: Operation,
|
operation: Operation,
|
||||||
|
|
|
@ -38,6 +38,8 @@ import {
|
||||||
Table,
|
Table,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
|
||||||
|
const { cleanExportRows } = require("./utils")
|
||||||
|
|
||||||
const CALCULATION_TYPES = {
|
const CALCULATION_TYPES = {
|
||||||
SUM: "sum",
|
SUM: "sum",
|
||||||
COUNT: "count",
|
COUNT: "count",
|
||||||
|
@ -417,7 +419,7 @@ export async function exportRows(ctx: Ctx) {
|
||||||
let rows: Row[] = []
|
let rows: Row[] = []
|
||||||
let schema = table.schema
|
let schema = table.schema
|
||||||
|
|
||||||
// // Filter data to only specified columns if required
|
// Filter data to only specified columns if required
|
||||||
if (columns && columns.length) {
|
if (columns && columns.length) {
|
||||||
for (let i = 0; i < result.length; i++) {
|
for (let i = 0; i < result.length; i++) {
|
||||||
rows[i] = {}
|
rows[i] = {}
|
||||||
|
@ -429,8 +431,7 @@ export async function exportRows(ctx: Ctx) {
|
||||||
rows = result
|
rows = result
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-ignore
|
let exportRows = cleanExportRows(rows, schema, format, columns)
|
||||||
let exportRows = cleanExportRows(rows, schema, format, columns) //this isnt correct
|
|
||||||
let headers = Object.keys(schema)
|
let headers = Object.keys(schema)
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|
Loading…
Reference in New Issue