Update relationship endpoints
This commit is contained in:
parent
feee4032d5
commit
9877cafaf4
|
@ -1,4 +1,4 @@
|
||||||
import { Row } from "@budibase/types"
|
import { FetchEnrichedRowResponse, Row } from "@budibase/types"
|
||||||
import { BaseAPIClient } from "./types"
|
import { BaseAPIClient } from "./types"
|
||||||
|
|
||||||
export interface RelationshipEndpoints {
|
export interface RelationshipEndpoints {
|
||||||
|
@ -19,7 +19,7 @@ export const buildRelationshipEndpoints = (
|
||||||
* @param fieldName the name of the relationship field
|
* @param fieldName the name of the relationship field
|
||||||
*/
|
*/
|
||||||
fetchRelationshipData: async (sourceId, rowId, fieldName) => {
|
fetchRelationshipData: async (sourceId, rowId, fieldName) => {
|
||||||
const response = await API.get<Row>({
|
const response = await API.get<FetchEnrichedRowResponse>({
|
||||||
url: `/api/${sourceId}/${rowId}/enrich?field=${fieldName}`,
|
url: `/api/${sourceId}/${rowId}/enrich?field=${fieldName}`,
|
||||||
})
|
})
|
||||||
if (!fieldName) {
|
if (!fieldName) {
|
||||||
|
|
Loading…
Reference in New Issue