mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 07:02:24 +00:00
store: Add delete_calendar
This commit is contained in:
@@ -66,6 +66,13 @@ impl CalendarStore for SqliteCalendarStore {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn delete_calendar(&mut self, cid: &str) -> Result<()> {
|
||||
sqlx::query!("DELETE FROM calendars WHERE id = ?", cid)
|
||||
.execute(&self.db)
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn get_events(&self, cid: &str) -> Result<Vec<Event>> {
|
||||
let events = sqlx::query_as!(EventRow, "SELECT uid, ics FROM events WHERE cid = ?", cid)
|
||||
.fetch_all(&self.db)
|
||||
|
||||
Reference in New Issue
Block a user