Clean ts
This commit is contained in:
parent
e29db10a77
commit
4826a5fbbf
|
@ -163,14 +163,10 @@ export async function fetchEnrichedRow(ctx: UserCtx) {
|
|||
},
|
||||
includeSqlRelationships: IncludeRelationship.INCLUDE,
|
||||
})
|
||||
row[fieldName] = await outputProcessing<Row[]>(
|
||||
linkedTable,
|
||||
relatedRows.rows,
|
||||
{
|
||||
squash: true,
|
||||
preserveLinks: true,
|
||||
}
|
||||
)
|
||||
row[fieldName] = await outputProcessing(linkedTable, relatedRows.rows, {
|
||||
squash: true,
|
||||
preserveLinks: true,
|
||||
})
|
||||
}
|
||||
return row
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ export default async (ctx: Ctx<Row, Row>, next: Next) => {
|
|||
}
|
||||
|
||||
// have to mutate the koa context, can't return
|
||||
export async function trimNonViewFields(
|
||||
async function trimNonViewFields(
|
||||
row: Row,
|
||||
view: ViewV2,
|
||||
permission: "WRITE" | "READ"
|
||||
|
|
|
@ -112,7 +112,7 @@ export async function search(
|
|||
: Promise.resolve(undefined),
|
||||
])
|
||||
|
||||
let processed = await outputProcessing<Row[]>(table, rows, {
|
||||
let processed = await outputProcessing(table, rows, {
|
||||
preserveLinks: true,
|
||||
squash: true,
|
||||
})
|
||||
|
@ -260,7 +260,7 @@ export async function fetch(tableId: string): Promise<Row[]> {
|
|||
includeSqlRelationships: IncludeRelationship.INCLUDE,
|
||||
})
|
||||
const table = await sdk.tables.getTable(tableId)
|
||||
return await outputProcessing<Row[]>(table, response.rows, {
|
||||
return await outputProcessing(table, response.rows, {
|
||||
preserveLinks: true,
|
||||
squash: true,
|
||||
})
|
||||
|
|
|
@ -61,7 +61,7 @@ export async function exportRows(
|
|||
})
|
||||
).rows.map(row => row.doc!)
|
||||
|
||||
result = await outputProcessing<Row[]>(table, response)
|
||||
result = await outputProcessing(table, response)
|
||||
} else if (query) {
|
||||
let searchResponse = await sdk.rows.search({
|
||||
tableId,
|
||||
|
|
|
@ -379,7 +379,7 @@ export async function search(
|
|||
}
|
||||
|
||||
// get the rows
|
||||
let finalRows = await outputProcessing<Row[]>(table, processed, {
|
||||
let finalRows = await outputProcessing(table, processed, {
|
||||
preserveLinks: true,
|
||||
squash: true,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue