Merge branch 'main' into alex/createTag
This commit is contained in:
commit
12450f8e9a
3 changed files with 3 additions and 3 deletions
2
src/appwrite.d.ts
vendored
2
src/appwrite.d.ts
vendored
|
@ -305,7 +305,7 @@ export type Client = {
|
||||||
setSelfSigned: (value: boolean) => void;
|
setSelfSigned: (value: boolean) => void;
|
||||||
};
|
};
|
||||||
export type UsersClient = {
|
export type UsersClient = {
|
||||||
deleteUser: (id: string) => Promise<any>;
|
delete: (id: string) => Promise<any>;
|
||||||
deleteSessions: (id: string) => Promise<any>;
|
deleteSessions: (id: string) => Promise<any>;
|
||||||
create: (email: string, password: string, name?: string) => Promise<any>;
|
create: (email: string, password: string, name?: string) => Promise<any>;
|
||||||
getLogs: (id: string) => Promise<Log[]>;
|
getLogs: (id: string) => Promise<Log[]>;
|
||||||
|
|
|
@ -16,7 +16,7 @@ export class Users {
|
||||||
}
|
}
|
||||||
|
|
||||||
public async delete(userId: string): Promise<void> {
|
public async delete(userId: string): Promise<void> {
|
||||||
await AppwriteCall(this.users.deleteUser(userId), () => {
|
await AppwriteCall(this.users.delete(userId), () => {
|
||||||
window.showInformationMessage(`Deleted user with id: ${userId}.`);
|
window.showInformationMessage(`Deleted user with id: ${userId}.`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ export async function deleteUser(userTreeItem: UserTreeItem): Promise<void> {
|
||||||
);
|
);
|
||||||
|
|
||||||
if (shouldDeleteUser === DialogResponses.yes) {
|
if (shouldDeleteUser === DialogResponses.yes) {
|
||||||
await usersClient.delete(userId);
|
await usersClient.delete(userId);
|
||||||
refreshTree("users");
|
refreshTree("users");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue