This commit is contained in:
2025-06-10 00:15:36 +02:00
parent b391db0253
commit 76d04a1e2a
2 changed files with 33 additions and 13 deletions

View File

@@ -120,7 +120,11 @@ export const updateInterest = async (id: string, data: Partial<Interest>, retryC
console.log('[nocodb.updateInterest] Clean data fields:', Object.keys(cleanData));
const url = `${createTableUrl(Table.Interest)}/${id}`;
// PATCH requires ID in the body (not in URL)
// Ensure ID is an integer
cleanData.Id = parseInt(id);
const url = createTableUrl(Table.Interest);
console.log('[nocodb.updateInterest] URL:', url);
try {
@@ -129,6 +133,7 @@ export const updateInterest = async (id: string, data: Partial<Interest>, retryC
});
console.log('[nocodb.updateInterest] Request body:', JSON.stringify(cleanData, null, 2));
// Try sending as a single object first (as shown in the API docs)
const result = await $fetch<Interest>(url, {
method: "PATCH",
headers: {