diff --git a/server/utils/nocodb.ts b/server/utils/nocodb.ts index 1fe352d..d8f2f2a 100644 --- a/server/utils/nocodb.ts +++ b/server/utils/nocodb.ts @@ -244,15 +244,20 @@ export const createInterest = async (data: Partial) => { export const deleteInterest = async (id: string) => { console.log('[nocodb.deleteInterest] Deleting interest:', id); - const url = `${createTableUrl(Table.Interest)}/${id}`; + const url = createTableUrl(Table.Interest); console.log('[nocodb.deleteInterest] URL:', url); try { + // According to NocoDB API docs, DELETE requires ID in the body const result = await $fetch(url, { method: "DELETE", headers: { "xc-token": getNocoDbConfiguration().token, + "Content-Type": "application/json" }, + body: { + "Id": parseInt(id) + } }); console.log('[nocodb.deleteInterest] Delete successful for ID:', id); return result;