Skip to content
Snippets Groups Projects
Commit 72a30d6a authored by Josh Brooks's avatar Josh Brooks
Browse files

Add API call for DeleteContact

parent c436065e
No related branches found
No related tags found
1 merge request!23Release
...@@ -541,6 +541,20 @@ func (c *Client) GetNodeRegistrationStatus() (int, int, error) { ...@@ -541,6 +541,20 @@ func (c *Client) GetNodeRegistrationStatus() (int, int, error) {
return numRegistered, len(nodes), nil return numRegistered, len(nodes), nil
} }
// DeleteContact is a function which removes a partner from Client's storage
func (c *Client) DeleteContact(partnerId *id.ID) error {
if err := c.storage.E2e().DeletePartner(partnerId); err != nil {
return err
}
if err := c.storage.Auth().Delete(partnerId); err != nil {
return err
}
// todo: find a way to clean partition up?
//c.storage.Partition().Clean()
return nil
}
// ----- Utility Functions ----- // ----- Utility Functions -----
// parseNDF parses the initial ndf string for the client. do not check the // parseNDF parses the initial ndf string for the client. do not check the
// signature, it is deprecated. // signature, it is deprecated.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment