From 36a976765c2a59d590a12fdf6f27f55980cfadd1 Mon Sep 17 00:00:00 2001 From: alexweininger Date: Mon, 31 May 2021 01:06:20 -0500 Subject: [PATCH] Fix error when deleting user --- src/appwrite.d.ts | 2 +- src/appwrite/Users.ts | 2 +- src/commands/users/deleteUser.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/appwrite.d.ts b/src/appwrite.d.ts index 85c16cb..136f20d 100644 --- a/src/appwrite.d.ts +++ b/src/appwrite.d.ts @@ -305,7 +305,7 @@ export type Client = { setSelfSigned: (value: boolean) => void; }; export type UsersClient = { - deleteUser: (id: string) => Promise; + delete: (id: string) => Promise; deleteSessions: (id: string) => Promise; create: (email: string, password: string, name?: string) => Promise; getLogs: (id: string) => Promise; diff --git a/src/appwrite/Users.ts b/src/appwrite/Users.ts index d178fc4..442d01a 100644 --- a/src/appwrite/Users.ts +++ b/src/appwrite/Users.ts @@ -16,7 +16,7 @@ export class Users { } public async delete(userId: string): Promise { - await AppwriteCall(this.users.deleteUser(userId), () => { + await AppwriteCall(this.users.delete(userId), () => { window.showInformationMessage(`Deleted user with id: ${userId}.`); }); } diff --git a/src/commands/users/deleteUser.ts b/src/commands/users/deleteUser.ts index 3c17a64..32d4480 100644 --- a/src/commands/users/deleteUser.ts +++ b/src/commands/users/deleteUser.ts @@ -20,7 +20,7 @@ export async function deleteUser(userTreeItem: UserTreeItem): Promise { ); if (shouldDeleteUser === DialogResponses.yes) { - await usersClient.delete(userId); + await usersClient.delete(userId); refreshTree("users"); } }