mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 02:22:21 +00:00
store: Add get_deleted_(addressbooks/calendars)
This commit is contained in:
@@ -93,6 +93,24 @@ impl AddressbookStore for SqliteStore {
|
||||
Ok(addressbooks)
|
||||
}
|
||||
|
||||
#[instrument]
|
||||
async fn get_deleted_addressbooks(
|
||||
&self,
|
||||
principal: &str,
|
||||
) -> Result<Vec<Addressbook>, rustical_store::Error> {
|
||||
let addressbooks = sqlx::query_as!(
|
||||
Addressbook,
|
||||
r#"SELECT principal, id, synctoken, displayname, description, deleted_at
|
||||
FROM addressbooks
|
||||
WHERE principal = ? AND deleted_at IS NOT NULL"#,
|
||||
principal
|
||||
)
|
||||
.fetch_all(&self.db)
|
||||
.await
|
||||
.map_err(crate::Error::from)?;
|
||||
Ok(addressbooks)
|
||||
}
|
||||
|
||||
#[instrument]
|
||||
async fn update_addressbook(
|
||||
&self,
|
||||
|
||||
Reference in New Issue
Block a user