1
0
Fork 0
mirror of synced 2024-09-09 22:16:26 +12:00
budibase/packages/frontend-core/src/fetch/RelationshipFetch.js

17 lines
445 B
JavaScript

import DataFetch from "./DataFetch.js"
export default class RelationshipFetch extends DataFetch {
async getData() {
const { datasource } = this.options
try {
const res = await this.API.fetchRelationshipData({
rowId: datasource?.rowId,
tableId: datasource?.rowTableId,
fieldName: datasource?.fieldName,
})
return { rows: res || [] }
} catch (error) {
return { rows: [] }
}
}
}