pass current day to IDStore constructor

This commit is contained in:
2025-10-27 16:08:18 +01:00
parent 7346fb42bd
commit 35f12a4c45
2 changed files with 4 additions and 5 deletions

View File

@@ -40,14 +40,12 @@ pub struct IDStore<T: Persistence> {
}
impl<T: Persistence> IDStore<T> {
pub async fn new_from_storage(mut persistence_layer: T) -> Self {
pub async fn new_from_storage(mut persistence_layer: T, current_date: Day) -> Self {
let mapping = match persistence_layer.load_mapping().await {
Some(map) => map,
None => IDMapping::new(),
};
let current_date: Day = Day::new(1);
let day = persistence_layer
.load_day(current_date)
.await