Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vilhelmprytz committed Jan 25, 2024
1 parent 7b45abd commit 7adfaf5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion routes/activity_leader.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ def students_callback():

# perform some validation against database
leader = dict_sql_query(
f"SELECT * FROM leaders WHERE email='{oauth_user['email']}'", fetchone=True
"SELECT * FROM leaders WHERE email = %s",
fetchone=True,
params=(oauth_user["email"],),
)

if not leader:
Expand Down
4 changes: 3 additions & 1 deletion routes/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def admin_callback():

# perform some validation against database
admin = dict_sql_query(
f"SELECT * FROM admins WHERE email='{oauth_user['email']}'", fetchone=True
"SELECT * FROM admins WHERE email = %s",
fetchone=True,
params=(oauth_user["email"],),
)

if not admin:
Expand Down
1 change: 1 addition & 0 deletions templates/leader/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,6 @@ <h2>Elever registrerade på aktivitet {{ activity["name"] }}</h2>
</tbody>
</table>
{% endfor %}
<p>Utskriftsdatum: {{ generation_time }}</p>
</div>
{% endblock %}

0 comments on commit 7adfaf5

Please sign in to comment.