Initial Nuxt data explorer setup
This commit is contained in:
12
nuxt4-app/server/api/metadata/[table]/[id].get.ts
Normal file
12
nuxt4-app/server/api/metadata/[table]/[id].get.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { fetchTableRecordMetadata } from '../../../services/table-service'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const table = event.context.params?.table
|
||||
const id = event.context.params?.id
|
||||
|
||||
if (!table || !id) {
|
||||
throw createError({ statusCode: 400, statusMessage: 'Tabla o id no especificados' })
|
||||
}
|
||||
|
||||
return await fetchTableRecordMetadata(table, id)
|
||||
})
|
||||
Reference in New Issue
Block a user