mirror of
https://github.com/Djeeberjr/fw-anwesenheit.git
synced 2026-05-03 03:31:56 +00:00
moved store saving to main
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user