Implemented delete_item for remote calendars
This commit is contained in:
parent
4f68296f93
commit
c63f859cbc
1 changed files with 6 additions and 2 deletions
|
@ -145,8 +145,12 @@ impl DavCalendar for RemoteCalendar {
|
|||
Ok(Some(item))
|
||||
}
|
||||
|
||||
async fn delete_item(&mut self, _item_id: &ItemId) -> Result<(), Box<dyn Error>> {
|
||||
log::error!("Not implemented");
|
||||
async fn delete_item(&mut self, item_id: &ItemId) -> Result<(), Box<dyn Error>> {
|
||||
reqwest::Client::new()
|
||||
.delete(item_id.as_url().clone())
|
||||
.basic_auth(self.resource.username(), Some(self.resource.password()))
|
||||
.send()
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue