Fix controller
This commit is contained in:
parent
5bd149f66f
commit
7465c04799
|
@ -161,8 +161,10 @@ export async function searchView(ctx: Ctx<void, SearchResponse>) {
|
||||||
const table = await sdk.tables.getTable(view?.tableId)
|
const table = await sdk.tables.getTable(view?.tableId)
|
||||||
|
|
||||||
const viewFields =
|
const viewFields =
|
||||||
view.columns?.length &&
|
(view.columns &&
|
||||||
Object.keys(sdk.views.enrichSchema(view, table.schema).schema)
|
Object.entries(view.columns).length &&
|
||||||
|
Object.keys(sdk.views.enrichSchema(view, table.schema).schema)) ||
|
||||||
|
undefined
|
||||||
|
|
||||||
ctx.status = 200
|
ctx.status = 200
|
||||||
ctx.body = await quotas.addQuery(
|
ctx.body = await quotas.addQuery(
|
||||||
|
|
|
@ -856,7 +856,7 @@ describe("/rows", () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const createViewResponse = await config.api.viewV2.create({
|
const createViewResponse = await config.api.viewV2.create({
|
||||||
columns: ["name"],
|
columns: { name: { visible: true } },
|
||||||
})
|
})
|
||||||
const response = await config.api.viewV2.search(createViewResponse.id)
|
const response = await config.api.viewV2.search(createViewResponse.id)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue