Fix linked record selector

This commit is contained in:
Andrew Kingston 2020-10-01 11:56:06 +01:00
parent 17d33dae20
commit 9929ec2ac5
1 changed files with 1 additions and 2 deletions

View File

@ -9,7 +9,6 @@
export let schema
export let linkedRecords = []
$: label = capitalise(schema.name)
$: linkedModelId = schema.modelId
$: linkedModel = $backendUiStore.models.find(
@ -18,7 +17,7 @@
$: promise = fetchRecords(linkedModelId)
async function fetchRecords(linkedModelId) {
const FETCH_RECORDS_URL = `/api/${}/records`
const FETCH_RECORDS_URL = `/api/${linkedModelId}/records`
const response = await api.get(FETCH_RECORDS_URL)
const result = await response.json()
console.log(result)