From afc51b8cba4be3ccfe00fae6c8674e99af944574 Mon Sep 17 00:00:00 2001 From: "Dr. Vortex" Date: Fri, 3 Nov 2023 06:47:48 -0500 Subject: [PATCH] Updated deleteAccount --- src/account.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/account.ts b/src/account.ts index a3498ff..04936a9 100644 --- a/src/account.ts +++ b/src/account.ts @@ -194,12 +194,11 @@ export async function createAccount(email: string, username: string, password: s * Deletes an account (Requires authenication) * @param id the ID of the account to delete */ -async function _delete(id: string): Promise { +export async function deleteAccount(id: string, reason?: string): Promise { checkAccountAttribute('id', id); - await request('POST', account_endpoint, { action: 'delete', id }); + await request('POST', account_endpoint, { action: 'delete', id, reason }); return; } -export { _delete as deleteAccount }; /** * Requests info about an account