diff --git a/crates/store/src/contact_birthday_store.rs b/crates/store/src/contact_birthday_store.rs index 0399d0a..eefb26a 100644 --- a/crates/store/src/contact_birthday_store.rs +++ b/crates/store/src/contact_birthday_store.rs @@ -1,9 +1,13 @@ +use std::sync::Arc; + use crate::{ AddressObject, Addressbook, AddressbookStore, Calendar, CalendarObject, CalendarStore, Error, }; use async_trait::async_trait; +use derive_more::derive::Constructor; -pub struct ContactBirthdayStore(AS); +#[derive(Constructor, Clone)] +pub struct ContactBirthdayStore(Arc); fn birthday_calendar(addressbook: Addressbook) -> Calendar { Calendar { @@ -24,7 +28,7 @@ fn birthday_calendar(addressbook: Addressbook) -> Calendar { } #[async_trait] -impl CalendarStore for ContactBirthdayStore { +impl CalendarStore for ContactBirthdayStore { async fn get_calendar(&self, principal: &str, id: &str) -> Result { let addressbook = self.0.get_addressbook(principal, id).await?; Ok(birthday_calendar(addressbook))