Refactor route validations to decorators

This commit is contained in:
Peter Stockings
2022-07-20 14:15:11 +10:00
parent 6e1f164ba9
commit ee8245bb4c
18 changed files with 464 additions and 407 deletions

View File

@@ -6,10 +6,10 @@
<div class="mb-4 flex items-center justify-between">
<div>
<h3 class="text-xl font-bold text-gray-900 mb-2">{{ topset['Name'] }}</h3>
<h3 class="text-xl font-bold text-gray-900 mb-2">{{ topset['PersonName'] }}</h3>
<span class="text-base font-normal text-gray-500">{{ topset['StartDate'] }}</span>
</div>
<a href="{{ url_for('delete_topset_from_workout_for_person', person_id=person_id, workout_id=workout_id, topset_id=topset_id)}}"
<a href="{{ url_for('delete_topset', person_id=topset['PersonId'], workout_id=topset['WorkoutId'], topset_id=topset['TopSetId'])}}"
class="text-sm font-medium text-cyan-600 hover:bg-gray-100 rounded-lg inline-flex items-center p-2">
Delete topset
</a>
@@ -30,7 +30,7 @@
<select
class="block appearance-none w-full bg-gray-200 border border-gray-200 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500"
id="grid-state" name="exercise_id">
{% for e in exercises %}
{% for e in topset['Exercises'] %}
<option value="{{ e['ExcerciseId'] }}" {% if topset['ExcerciseId']==e['ExcerciseId'] %}
selected {% endif %}>{{
e['Name']}}</option>