import * as sdk from "https://deno.land/x/[email protected]/mod.ts";
import type { Resource } from "https://deno.land/x/[email protected]/mod.ts";
export async function main(
auth: Resource<"appwrite">,
collectionId: string,
databaseId: string,
documentId: string
)
{
let client = new sdk.Client();
client
.setEndpoint(auth.endpoint) // Your API Endpoint
.setProject(auth.project) // Your project ID
.setKey(auth.key) // Your secret API key
const databases = new sdk.Databases(client);
return await databases.deleteDocument
(
databaseId,
collectionId,
documentId
)
}
Submitted by said30 1227 days ago