Type checking.

This commit is contained in:
mike12345567 2024-06-14 19:07:50 +01:00
parent cd1e7c0bad
commit 654a417d66
2 changed files with 2 additions and 2 deletions

View File

@ -137,7 +137,7 @@ export async function sqlOutputProcessing(
relationships: RelationshipsJson[],
opts?: { sqs?: boolean }
): 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 []
}
let finalRows: { [key: string]: Row } = {}

View File

@ -60,7 +60,7 @@ export async function searchView(
user: sdk.users.getUserContextBindings(ctx.user),
})
const searchOptions: RequiredKeys<SearchViewRowRequest> &
const searchOptions: RequiredKeys<Omit<SearchViewRowRequest, "countRows">> &
RequiredKeys<Pick<RowSearchParams, "tableId" | "query" | "fields">> = {
tableId: view.tableId,
query: enrichedQuery,