Edits history of script submission #387 for ' Delete item from a NocoDb table (nocodb)'

  • deno
    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 1071 days ago