Merge pull request #15197 from Budibase/fix/datasource-store-bug

Datasource fetch schema fix
This commit is contained in:
Michael Drury 2024-12-17 14:23:15 +00:00 committed by GitHub
commit 6decd74495
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 8 deletions

View File

@ -93,10 +93,10 @@ export function createDatasourcesStore() {
}
const updateSchema = async (datasource, tablesFilter) => {
const response = await API.buildDatasourceSchema({
datasourceId: datasource?._id,
tablesFilter,
})
const response = await API.buildDatasourceSchema(
datasource?._id,
tablesFilter
)
updateDatasource(response)
}
@ -155,10 +155,7 @@ export function createDatasourcesStore() {
if (!datasource?._id || !datasource?._rev) {
return
}
await API.deleteDatasource({
datasourceId: datasource._id,
datasourceRev: datasource._rev,
})
await API.deleteDatasource(datasource._id, datasource._rev)
replaceDatasource(datasource._id, null)
}