Add options to filter epoch for exercise progress graphs (1M, 3M, 6M, All), however if there isnt data in a selected epoch the endpoint returns 404. Havent bothered to look into to it, probs should clean up code as well
This commit is contained in:
4
app.py
4
app.py
@@ -413,7 +413,9 @@ def get_exercise_progress_for_user(person_id, exercise_id):
|
||||
'min_date'), '%Y-%m-%d')
|
||||
max_date = convert_str_to_date(request.args.get(
|
||||
'max_date'), '%Y-%m-%d')
|
||||
exercise_progress = db.get_exercise_progress_for_user(person_id, exercise_id, min_date, max_date)
|
||||
epoch = request.args.get('epoch', default='All')
|
||||
|
||||
exercise_progress = db.get_exercise_progress_for_user(person_id, exercise_id, min_date, max_date, epoch)
|
||||
|
||||
if not exercise_progress:
|
||||
abort(404)
|
||||
|
||||
Reference in New Issue
Block a user