Throw error when attempting to fetch an individual row from a view

This commit is contained in:
Andrew Kingston 2023-08-15 15:47:26 +01:00
parent 123be842fb
commit b53f61228c
1 changed files with 2 additions and 13 deletions

View File

@ -43,19 +43,8 @@ export const createActions = context => {
})
}
// TODO: update in future. We can't depend on having table read access.
const getRow = async id => {
const res = await API.searchTable({
tableId: get(datasource).tableId,
limit: 1,
query: {
equal: {
_id: id,
},
},
paginate: false,
})
return res?.rows?.[0]
const getRow = () => {
throw "Views don't support fetching individual rows"
}
const isDatasourceValid = datasource => {