import { Resource } from "https://deno.land/x/windmill/mod.ts";
export async function main(
nocodb: Resource<"nocodb">,
id: string
) {
// delete row in nocodb
const res = await fetch(`${nocodb.apiUrl}/api/v1/db/data/v1/${nocodb.workspace}/${nocodb.table}/${id}`, {
method: "DELETE",
headers: {
"Content-Type": "application/json",
"xc-token": nocodb.xc_token,
}
})
const data = await res.json()
return data
}
Submitted by yassinsiouda74165 344 days ago