Can delete account
This commit is contained in:
		@@ -19,6 +19,10 @@ export enum ReplacePasswordResponse {
 | 
			
		||||
  TooManyRequests,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface DeleteAccountTokenInfo {
 | 
			
		||||
  email: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export class UserApi {
 | 
			
		||||
  /**
 | 
			
		||||
   * Get current user information
 | 
			
		||||
@@ -89,4 +93,30 @@ export class UserApi {
 | 
			
		||||
      method: "GET",
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Check delete account token
 | 
			
		||||
   */
 | 
			
		||||
  static async CheckDeleteAccountToken(
 | 
			
		||||
    token: string
 | 
			
		||||
  ): Promise<DeleteAccountTokenInfo> {
 | 
			
		||||
    return (
 | 
			
		||||
      await APIClient.exec({
 | 
			
		||||
        uri: "/user/check_delete_token",
 | 
			
		||||
        method: "POST",
 | 
			
		||||
        jsonData: { token: token },
 | 
			
		||||
      })
 | 
			
		||||
    ).data;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Delete account
 | 
			
		||||
   */
 | 
			
		||||
  static async DeleteAccount(token: string): Promise<void> {
 | 
			
		||||
    await APIClient.exec({
 | 
			
		||||
      uri: "/user/delete_account",
 | 
			
		||||
      method: "POST",
 | 
			
		||||
      jsonData: { token: token },
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user