Update Terms of Use Modal and fix message flashing.

This commit is contained in:
Patrick Jentsch
2025-06-03 13:51:28 +02:00
parent c28d534942
commit 56844e0898
8 changed files with 53 additions and 28 deletions
app
blueprints
static
js
app
client.js
endpoints
extensions
templates

@@ -132,19 +132,3 @@ def delete_user_avatar(user_id: int):
thread.start()
return jsonify('Avatar marked for deletion'), 202
# TODO: Move this to main blueprint(?)
@bp.route('/accept-terms-of-use', methods=['POST'])
@login_required
def accept_terms_of_use():
if not (
current_user.is_authenticated
or current_user.confirmed
):
abort(403)
current_user.terms_of_use_accepted = True
db.session.commit()
return jsonify('You accepted the terms of use'), 202