mirror of
https://github.com/chatmail/core.git
synced 2026-04-23 16:36:30 +03:00
api!(contact): remove Contact::load_from_db() in favor of Contact::get_by_id()
This commit is contained in:
@@ -1340,7 +1340,7 @@ impl CommandApi {
|
||||
) -> Result<()> {
|
||||
let ctx = self.get_context(account_id).await?;
|
||||
let contact_id = ContactId::new(contact_id);
|
||||
let contact = Contact::load_from_db(&ctx, contact_id).await?;
|
||||
let contact = Contact::get_by_id(&ctx, contact_id).await?;
|
||||
let addr = contact.get_addr();
|
||||
Contact::create(&ctx, &name, addr).await?;
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user