mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 07:02:24 +00:00
migrate birthday store to sqlite
This commit is contained in:
11
src/app.rs
11
src/app.rs
@@ -16,7 +16,8 @@ use rustical_frontend::{FrontendConfig, frontend_router};
|
||||
use rustical_oidc::OidcConfig;
|
||||
use rustical_store::auth::AuthenticationProvider;
|
||||
use rustical_store::{
|
||||
AddressbookStore, CalendarStore, CombinedCalendarStore, ContactBirthdayStore, SubscriptionStore,
|
||||
AddressbookStore, CalendarStore, CombinedCalendarStore, PrefixedCalendarStore,
|
||||
SubscriptionStore,
|
||||
};
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
@@ -33,7 +34,11 @@ use tracing::field::display;
|
||||
clippy::too_many_lines,
|
||||
clippy::cognitive_complexity
|
||||
)]
|
||||
pub fn make_app<AS: AddressbookStore, CS: CalendarStore, S: SubscriptionStore>(
|
||||
pub fn make_app<
|
||||
AS: AddressbookStore + PrefixedCalendarStore,
|
||||
CS: CalendarStore,
|
||||
S: SubscriptionStore,
|
||||
>(
|
||||
addr_store: Arc<AS>,
|
||||
cal_store: Arc<CS>,
|
||||
subscription_store: Arc<S>,
|
||||
@@ -45,7 +50,7 @@ pub fn make_app<AS: AddressbookStore, CS: CalendarStore, S: SubscriptionStore>(
|
||||
session_cookie_samesite_strict: bool,
|
||||
payload_limit_mb: usize,
|
||||
) -> Router<()> {
|
||||
let birthday_store = Arc::new(ContactBirthdayStore::new(addr_store.clone()));
|
||||
let birthday_store = addr_store.clone();
|
||||
let combined_cal_store =
|
||||
Arc::new(CombinedCalendarStore::new(cal_store).with_store(birthday_store));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user