From c3337cf236a85dfc6bdd86f16c27a505291911e3 Mon Sep 17 00:00:00 2001 From: sandre Date: Sat, 24 Jan 2026 14:46:47 +0100 Subject: [PATCH] Add the reset of Stats --- .../Interfaces/IStatsByAircraftService.cs | 2 ++ .../Interfaces/IStatsByDzService.cs | 2 ++ .../Interfaces/IStatsByGearService.cs | 2 ++ .../Interfaces/IStatsByJumpTypeService.cs | 2 ++ .../IStatsByYearByJumpTypeService.cs | 2 ++ .../Interfaces/IStatsByYearService.cs | 2 ++ .../IStatsForLastMonthByDzService.cs | 2 ++ .../IStatsForLastMonthByJumpTypeService.cs | 2 ++ .../IStatsForLastYearByDzService.cs | 2 ++ .../IStatsForLastYearByJumpTypeService.cs | 2 ++ .../StatsService.cs | 24 ++++++++----------- 11 files changed, 30 insertions(+), 14 deletions(-) diff --git a/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByAircraftService.cs b/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByAircraftService.cs index 7d9136f..d998a39 100644 --- a/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByAircraftService.cs +++ b/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByAircraftService.cs @@ -9,6 +9,8 @@ namespace skydiveLogs_api.DomainBusiness.Interfaces IEnumerable GetStats(); + void Reset(); + #endregion Public Methods } } \ No newline at end of file diff --git a/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByDzService.cs b/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByDzService.cs index d7d81bf..34c41f8 100644 --- a/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByDzService.cs +++ b/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByDzService.cs @@ -9,6 +9,8 @@ namespace skydiveLogs_api.DomainBusiness.Interfaces IEnumerable GetStats(); + void Reset(); + #endregion Public Methods } } \ No newline at end of file diff --git a/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByGearService.cs b/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByGearService.cs index c471fa2..0a83b28 100644 --- a/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByGearService.cs +++ b/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByGearService.cs @@ -9,6 +9,8 @@ namespace skydiveLogs_api.DomainBusiness.Interfaces IEnumerable GetStats(); + void Reset(); + #endregion Public Methods } } \ No newline at end of file diff --git a/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByJumpTypeService.cs b/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByJumpTypeService.cs index b58ae65..0857475 100644 --- a/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByJumpTypeService.cs +++ b/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByJumpTypeService.cs @@ -9,6 +9,8 @@ namespace skydiveLogs_api.DomainBusiness.Interfaces IEnumerable GetStats(); + void Reset(); + #endregion Public Methods } } \ No newline at end of file diff --git a/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByYearByJumpTypeService.cs b/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByYearByJumpTypeService.cs index f900ac0..152be31 100644 --- a/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByYearByJumpTypeService.cs +++ b/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByYearByJumpTypeService.cs @@ -9,6 +9,8 @@ namespace skydiveLogs_api.DomainBusiness.Interfaces IEnumerable GetStats(); + void Reset(); + #endregion Public Methods } } \ No newline at end of file diff --git a/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByYearService.cs b/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByYearService.cs index 83b6ab7..39fc2e4 100644 --- a/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByYearService.cs +++ b/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsByYearService.cs @@ -8,6 +8,8 @@ namespace skydiveLogs_api.DomainBusiness.Interfaces #region Public Methods IEnumerable GetStats(); + void Reset(); + #endregion Public Methods } } \ No newline at end of file diff --git a/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsForLastMonthByDzService.cs b/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsForLastMonthByDzService.cs index 432ce09..c7c9cbc 100644 --- a/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsForLastMonthByDzService.cs +++ b/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsForLastMonthByDzService.cs @@ -9,6 +9,8 @@ namespace skydiveLogs_api.DomainBusiness.Interfaces IEnumerable GetStats(); + void Reset(); + #endregion Public Methods } } \ No newline at end of file diff --git a/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsForLastMonthByJumpTypeService.cs b/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsForLastMonthByJumpTypeService.cs index 5a7a88e..581bc78 100644 --- a/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsForLastMonthByJumpTypeService.cs +++ b/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsForLastMonthByJumpTypeService.cs @@ -9,6 +9,8 @@ namespace skydiveLogs_api.DomainBusiness.Interfaces IEnumerable GetStats(); + void Reset(); + #endregion Public Methods } } \ No newline at end of file diff --git a/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsForLastYearByDzService.cs b/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsForLastYearByDzService.cs index 954b86f..19533a2 100644 --- a/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsForLastYearByDzService.cs +++ b/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsForLastYearByDzService.cs @@ -9,6 +9,8 @@ namespace skydiveLogs_api.DomainBusiness.Interfaces IEnumerable GetStats(); + void Reset(); + #endregion Public Methods } } \ No newline at end of file diff --git a/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsForLastYearByJumpTypeService.cs b/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsForLastYearByJumpTypeService.cs index c60ee9a..a2d20d8 100644 --- a/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsForLastYearByJumpTypeService.cs +++ b/Back/skydiveLogs-api.DomainBusiness/Interfaces/IStatsForLastYearByJumpTypeService.cs @@ -9,6 +9,8 @@ namespace skydiveLogs_api.DomainBusiness.Interfaces IEnumerable GetStats(); + void Reset(); + #endregion Public Methods } } \ No newline at end of file diff --git a/Back/skydiveLogs-api.DomainBusiness/StatsService.cs b/Back/skydiveLogs-api.DomainBusiness/StatsService.cs index 74cf267..e6eb3e2 100644 --- a/Back/skydiveLogs-api.DomainBusiness/StatsService.cs +++ b/Back/skydiveLogs-api.DomainBusiness/StatsService.cs @@ -60,20 +60,16 @@ namespace skydiveLogs_api.DomainBusiness public void Reset() { - // var resetStats = new UserStats(); - // var myStats = GetAllStats(); - // myStats.ByAircraft = resetStats.ByAircraft; - // myStats.ByDz = resetStats.ByDz; - // myStats.ByGear = resetStats.ByGear; - // myStats.ByJumpType = resetStats.ByJumpType; - // myStats.ByYear = resetStats.ByYear; - // myStats.ForLastMonthByDz = resetStats.ForLastMonthByDz; - // myStats.ForLastMonthByJumpType = resetStats.ForLastMonthByJumpType; - // myStats.ForLastYearByDz = resetStats.ForLastYearByDz; - // myStats.ForLastYearByJumpType = resetStats.ForLastYearByJumpType; - // myStats.ByYearByJumpType = resetStats.ByYearByJumpType; - - // _userStatsRepository.Update(myStats); + _statsByAircraftService.Reset(); + _statsByDzService.Reset(); + _statsByGearService.Reset(); + _statsByJumpTypeService.Reset(); + _statsByYearByJumpTypeService.Reset(); + _statsByYearService.Reset(); + _statsForLastMonthByDzService.Reset(); + _statsForLastMonthByJumpTypeService.Reset(); + _statsForLastYearByDzService.Reset(); + _statsForLastYearByJumpTypeService.Reset(); } public IEnumerable GetStatsByAircraft()