1
0
Fork 0
mirror of synced 2024-09-09 22:16:26 +12:00

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[], 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 } = {}

View file

@ -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,