0
Delete User
One script reply has been approved by the moderators Verified
Created by adam186 614 days ago Viewed 9189 times
0
Submitted by adam186 Deno
Verified 614 days ago
1
import { Client, Users } from "https://deno.land/x/appwrite@7.0.0/mod.ts";
2

3
type Appwrite = {
4
  endpoint: string;
5
  project: string;
6
  key: string;
7
  self_signed: boolean;
8
};
9
export async function main(auth: Appwrite, id: string) {
10
  const client = new Client()
11
    .setEndpoint(auth.endpoint)
12
    .setProject(auth.project)
13
    .setKey(auth.key);
14
  const users = new Users(client);
15

16
  return await users.delete(id);
17
}
18