lots of stuff, don't truly remember
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user