mirror of
https://github.com/chatmail/core.git
synced 2026-05-16 21:36:30 +03:00
jsonrpc: do not return a result from deleteContact()
It was always true anyway.
This commit is contained in:
@@ -1146,12 +1146,12 @@ impl CommandApi {
|
|||||||
Ok(contacts)
|
Ok(contacts)
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn delete_contact(&self, account_id: u32, contact_id: u32) -> Result<bool> {
|
async fn delete_contact(&self, account_id: u32, contact_id: u32) -> Result<()> {
|
||||||
let ctx = self.get_context(account_id).await?;
|
let ctx = self.get_context(account_id).await?;
|
||||||
let contact_id = ContactId::new(contact_id);
|
let contact_id = ContactId::new(contact_id);
|
||||||
|
|
||||||
Contact::delete(&ctx, contact_id).await?;
|
Contact::delete(&ctx, contact_id).await?;
|
||||||
Ok(true)
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn change_contact_name(
|
async fn change_contact_name(
|
||||||
|
|||||||
@@ -616,7 +616,7 @@ describe('Offline Tests with unconfigured account', function () {
|
|||||||
const id = context.createContact('someuser', 'someuser@site.com')
|
const id = context.createContact('someuser', 'someuser@site.com')
|
||||||
const contact = context.getContact(id)
|
const contact = context.getContact(id)
|
||||||
strictEqual(contact.getId(), id, 'contact id matches')
|
strictEqual(contact.getId(), id, 'contact id matches')
|
||||||
strictEqual(context.deleteContact(id), true, 'delete call succesful')
|
context.deleteContact(id)
|
||||||
strictEqual(context.getContact(id), null, 'contact is gone')
|
strictEqual(context.getContact(id), null, 'contact is gone')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user