14 lines
395 B
TypeScript
14 lines
395 B
TypeScript
export default defineEventHandler(async (event) => {
|
|
const config = useRuntimeConfig()
|
|
const orgId = getRouterParam(event, 'orgId')
|
|
const url = `${config.nocodbUrl}/api/v2/tables/${config.avisTableId}/records?where=(organisation_id,eq,${orgId})~and(status,eq,approved)`
|
|
|
|
const data = await $fetch(url, {
|
|
headers: {
|
|
'xc-token': config.nocodbToken,
|
|
},
|
|
})
|
|
|
|
return data
|
|
})
|