wip: snapshot V2 cascade onglet 2 (sauvegarde avant chirurgie git-hygiene)

This commit is contained in:
Jules Neny
2026-05-06 15:37:13 +02:00
parent 5878c56888
commit e63d02a351
101 changed files with 188900 additions and 3959 deletions

View File

@@ -1,16 +0,0 @@
export default defineEventHandler(async (event) => {
const config = useRuntimeConfig()
const body = await readBody(event)
const url = `${config.nocodbUrl}/api/v2/tables/${config.avisTableId}/records`
const data = await $fetch(url, {
method: 'POST',
headers: {
'xc-token': config.nocodbToken,
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
})
return data
})

View File

@@ -1,13 +0,0 @@
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
})

View File

@@ -1,16 +0,0 @@
export default defineEventHandler(async (event) => {
const config = useRuntimeConfig()
const body = await readBody(event)
const url = `${config.nocodbUrl}/api/v2/tables/${config.orgTableId}/records`
const data = await $fetch(url, {
method: 'POST',
headers: {
'xc-token': config.nocodbToken,
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
})
return data
})

View File

@@ -1,17 +0,0 @@
export default defineEventHandler(async (event) => {
const config = useRuntimeConfig()
const id = getRouterParam(event, 'id')
const url = `${config.nocodbUrl}/api/v2/tables/${config.orgTableId}/records?where=(Id,eq,${id})&limit=1`
const data: any = await $fetch(url, {
headers: {
'xc-token': config.nocodbToken,
},
})
const record = data?.list?.[0] ?? null
if (!record) {
throw createError({ statusCode: 404, message: 'Organisation non trouvée' })
}
return record
})