2021-12-17 10:52:12 +01:00
|
|
|
import DataFetch from "./DataFetch.js"
|
2021-12-17 09:22:04 +01:00
|
|
|
|
2021-12-17 19:39:48 +01:00
|
|
|
export default class RelationshipFetch extends DataFetch {
|
2021-12-17 09:22:04 +01:00
|
|
|
async getData() {
|
|
|
|
const { datasource } = this.options
|
2022-01-20 10:40:53 +01:00
|
|
|
try {
|
|
|
|
const res = await this.API.fetchRelationshipData({
|
|
|
|
rowId: datasource?.rowId,
|
|
|
|
tableId: datasource?.rowTableId,
|
|
|
|
fieldName: datasource?.fieldName,
|
|
|
|
})
|
|
|
|
return { rows: res || [] }
|
|
|
|
} catch (error) {
|
|
|
|
return { rows: [] }
|
2021-12-17 09:22:04 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|