fixes
This commit is contained in:
parent
4d55bb63b2
commit
5e4b20f6ae
|
|
@ -244,15 +244,20 @@ export const createInterest = async (data: Partial<Interest>) => {
|
||||||
|
|
||||||
export const deleteInterest = async (id: string) => {
|
export const deleteInterest = async (id: string) => {
|
||||||
console.log('[nocodb.deleteInterest] Deleting interest:', id);
|
console.log('[nocodb.deleteInterest] Deleting interest:', id);
|
||||||
const url = `${createTableUrl(Table.Interest)}/${id}`;
|
const url = createTableUrl(Table.Interest);
|
||||||
console.log('[nocodb.deleteInterest] URL:', url);
|
console.log('[nocodb.deleteInterest] URL:', url);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// According to NocoDB API docs, DELETE requires ID in the body
|
||||||
const result = await $fetch(url, {
|
const result = await $fetch(url, {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
"xc-token": getNocoDbConfiguration().token,
|
"xc-token": getNocoDbConfiguration().token,
|
||||||
|
"Content-Type": "application/json"
|
||||||
},
|
},
|
||||||
|
body: {
|
||||||
|
"Id": parseInt(id)
|
||||||
|
}
|
||||||
});
|
});
|
||||||
console.log('[nocodb.deleteInterest] Delete successful for ID:', id);
|
console.log('[nocodb.deleteInterest] Delete successful for ID:', id);
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue