by yassinsiouda74165 ยท 6/12/2023
1
import { Resource } from "https://deno.land/x/windmill/mod.ts";
2
export async function main(
3
nocodb: Resource<"nocodb">,
4
id: string
5
6
) {
7
// delete row in nocodb
8
const res = await fetch(`${nocodb.apiUrl}/api/v1/db/data/v1/${nocodb.workspace}/${nocodb.table}/${id}`, {
9
method: "DELETE",
10
headers: {
11
"Content-Type": "application/json",
12
"xc-token": nocodb.xc_token,
13
}
14
})
15
const data = await res.json()
16
return data
17