Switch to using custom svg sparkline for exercise graphs on person view, this isnt a proper implementation as it separate requests for each exercise selected (Want to get rid of dependency on plotly)
This commit is contained in:
6
app.py
6
app.py
@@ -432,7 +432,11 @@ def calculate_relative_positions(start_dates):
|
||||
|
||||
@ app.route("/person/<int:person_id>/exercise/<int:exercise_id>/sparkline", methods=['GET'])
|
||||
def get_exercise_progress_for_user(person_id, exercise_id):
|
||||
exercise_progress = db.get_exercise_progress_for_user(person_id, exercise_id)
|
||||
min_date = convert_str_to_date(request.args.get(
|
||||
'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)
|
||||
|
||||
if not exercise_progress:
|
||||
abort(404)
|
||||
|
||||
Reference in New Issue
Block a user