lots of stuff, don't truly remember

This commit is contained in:
Blake Ridgway
2026-05-17 20:39:47 -05:00
parent 178ffb3425
commit dc4fe558b7
35 changed files with 3501 additions and 112 deletions

View File

@@ -39,6 +39,13 @@ func (s *Service) GetUserWorkouts(userID uint) ([]Workout, error) {
return s.repo.GetUserWorkouts(userID)
}
func (s *Service) GetUserWorkoutsByTags(userID uint, tags []string) ([]Workout, error) {
if len(tags) == 0 {
return s.repo.GetUserWorkouts(userID)
}
return s.repo.GetUserWorkoutsByTags(userID, tags)
}
func (s *Service) GetWorkoutsByMonth(userID uint, year, month int) ([]Workout, error) {
return s.repo.GetWorkoutsByMonth(userID, year, month)
}
@@ -87,6 +94,10 @@ func (s *Service) DeleteWorkout(id, userID uint) error {
return s.repo.DeleteWorkout(id, userID)
}
func (s *Service) RemoveDuplicates(userID uint) (int64, error) {
return s.repo.RemoveDuplicates(userID)
}
func (s *Service) GetEquipmentStats(userID uint) ([]EquipmentStat, error) {
return s.repo.GetEquipmentStats(userID)
}
}