Compare commits
5 Commits
1561aff5d9
...
830b39fb1d
Author | SHA1 | Date | |
---|---|---|---|
830b39fb1d | |||
54d5164b73 | |||
04b59d5b80 | |||
8baa5ce2f7 | |||
b83c442f0c |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
develop.md
|
||||
.env
|
||||
/tmp
|
@ -1,3 +1,6 @@
|
||||
from . import db
|
||||
from datetime import datetime
|
||||
|
||||
class User(db.Model):
|
||||
__tablename__ = 'users'
|
||||
|
||||
|
@ -0,0 +1,2 @@
|
||||
from app.repositories.workout_repository import WorkoutRepository
|
||||
from app.models.workout import Workout
|
@ -0,0 +1,15 @@
|
||||
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