Type checking.
This commit is contained in:
parent
cd1e7c0bad
commit
654a417d66
|
@ -137,7 +137,7 @@ export async function sqlOutputProcessing(
|
||||||
relationships: RelationshipsJson[],
|
relationships: RelationshipsJson[],
|
||||||
opts?: { sqs?: boolean }
|
opts?: { sqs?: boolean }
|
||||||
): Promise<Row[]> {
|
): Promise<Row[]> {
|
||||||
if (!Array.isArray(rows) || rows.length === 0 || rows[0].read === true) {
|
if (!Array.isArray(rows) || rows.length === 0 || "read" in rows[0]) {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
let finalRows: { [key: string]: Row } = {}
|
let finalRows: { [key: string]: Row } = {}
|
||||||
|
|
|
@ -60,7 +60,7 @@ export async function searchView(
|
||||||
user: sdk.users.getUserContextBindings(ctx.user),
|
user: sdk.users.getUserContextBindings(ctx.user),
|
||||||
})
|
})
|
||||||
|
|
||||||
const searchOptions: RequiredKeys<SearchViewRowRequest> &
|
const searchOptions: RequiredKeys<Omit<SearchViewRowRequest, "countRows">> &
|
||||||
RequiredKeys<Pick<RowSearchParams, "tableId" | "query" | "fields">> = {
|
RequiredKeys<Pick<RowSearchParams, "tableId" | "query" | "fields">> = {
|
||||||
tableId: view.tableId,
|
tableId: view.tableId,
|
||||||
query: enrichedQuery,
|
query: enrichedQuery,
|
||||||
|
|
Loading…
Reference in New Issue