Compare commits
No commits in common. "830b39fb1da478a3082e9c98b3782f107a903be3" and "1561aff5d94dfea79582c798076ad4934a0be6e3" have entirely different histories.
830b39fb1d
...
1561aff5d9
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,2 @@
|
|||||||
develop.md
|
develop.md
|
||||||
.env
|
.env
|
||||||
/tmp
|
|
@ -1,6 +1,3 @@
|
|||||||
from . import db
|
|
||||||
from datetime import datetime
|
|
||||||
|
|
||||||
class User(db.Model):
|
class User(db.Model):
|
||||||
__tablename__ = 'users'
|
__tablename__ = 'users'
|
||||||
|
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
from app.repositories.workout_repository import WorkoutRepository
|
|
||||||
from app.models.workout import Workout
|
|
@ -1,15 +0,0 @@
|
|||||||
from app.repositories.workout_repository import WorkoutRepository
|
|
||||||
from app.models.workout import Workout
|
|
||||||
|
|
||||||
class WorkoutService:
|
|
||||||
def __init__(self):
|
|
||||||
self.workout_repository = WorkoutRepository()
|
|
||||||
|
|
||||||
def get_all_workouts(self):
|
|
||||||
return self.workout_repository.get_all()
|
|
||||||
|
|
||||||
def get_workout_by_id(self, workout_id):
|
|
||||||
workout = self.workout_repository.get_by_id(workout_id)
|
|
||||||
if not workout:
|
|
||||||
return None
|
|
||||||
return workout
|
|
Loading…
x
Reference in New Issue
Block a user