実際のDBで動作するように

This commit is contained in:
2025-07-29 18:33:12 +09:00
parent 5c29ad9cf6
commit e8094c6e75
2 changed files with 25 additions and 26 deletions

View File

@@ -6,10 +6,11 @@ class WorkoutService:
self.workout_repository = WorkoutRepository()
def get_all_workouts(self):
return self.workout_repository.get_all()
return self.workout_repository.get_all_workouts()
def get_workout_by_id(self, workout_id):
workout = self.workout_repository.get_by_id(workout_id)
workout = self.workout_repository.get_workout_by_id(workout_id)
if not workout:
return None
return workout
return workout
# TODO:Workout追加、更新、ジム入退時刻追加更新