Skip to content

Commit

Permalink
Updated deleteAccount
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Nov 3, 2023
1 parent c784859 commit afc51b8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
export async function deleteAccount(id: string, reason?: string): Promise<void> {
checkAccountAttribute('id', id);
await request<void>('POST', account_endpoint, { action: 'delete', id });
await request<void>('POST', account_endpoint, { action: 'delete', id, reason });
return;
}
export { _delete as deleteAccount };

/**
* Requests info about an account
Expand Down

0 comments on commit afc51b8

Please sign in to comment.