moved store saving to main

This commit is contained in:
2025-04-27 15:08:27 +02:00
parent fda61c1a5a
commit 39746f59f7
2 changed files with 9 additions and 18 deletions

View File

@@ -44,14 +44,8 @@ impl IDStore {
/// Add a new id for the current day
/// Returns false if ID is already present at the current day.
/// Can fail because the store will be saved to a file.
pub fn add_id(&mut self, id: TallyID) -> Result<bool, Box<dyn Error>> {
if self.get_current_day().add_id(id) {
self.export_json("./data.json")?;
return Ok(true);
}
Ok(false)
pub fn add_id(&mut self, id: TallyID) -> bool {
self.get_current_day().add_id(id)
}
/// Get the `AttendanceDay` of the current day