wip: snapshot V2 cascade onglet 2 (sauvegarde avant chirurgie git-hygiene)
This commit is contained in:
@@ -107,7 +107,8 @@ async function fetchApprovedOrgs(config: {
|
||||
orgTableId: string
|
||||
}): Promise<OrgRow[]> {
|
||||
const { nocodbUrl, nocodbToken, orgTableId } = config
|
||||
const url = `${nocodbUrl}/api/v2/tables/${orgTableId}/records`
|
||||
const nocoBaseId = process.env.NOCODB_BASE_ID || 'p_nav_v2'
|
||||
const url = `${nocodbUrl}/api/v1/db/data/noco/${nocoBaseId}/${orgTableId}`
|
||||
|
||||
try {
|
||||
const res = await $fetch<{ list: OrgRow[] }>(url, {
|
||||
@@ -136,9 +137,11 @@ async function logUsage(params: {
|
||||
coutEur: number
|
||||
}) {
|
||||
const { nocodbUrl, nocodbToken, statsTableId, tokensIn, tokensOut, coutEur } = params
|
||||
const logUrl = `${nocodbUrl}/api/v2/tables/${statsTableId}/records`
|
||||
const nocoBaseId = process.env.NOCODB_BASE_ID || 'p_nav_v2'
|
||||
const url = `${nocodbUrl}/api/v1/db/data/noco/${nocoBaseId}/${statsTableId}`
|
||||
|
||||
try {
|
||||
await $fetch(logUrl, {
|
||||
await $fetch(url, {
|
||||
method: 'POST',
|
||||
headers: { 'xc-token': nocodbToken, 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
|
||||
Reference in New Issue
Block a user