This commit is contained in:
Matt 2025-06-10 12:31:00 +02:00
parent 4d55bb63b2
commit 5e4b20f6ae
1 changed files with 6 additions and 1 deletions

View File

@ -244,15 +244,20 @@ export const createInterest = async (data: Partial<Interest>) => {
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;