mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-15 18:40:40 +00:00
Update Terms of Use Modal and fix message flashing.
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
from flask import flash, redirect, render_template, url_for
|
||||
from flask import abort, flash, jsonify, redirect, render_template, url_for
|
||||
from flask_login import current_user, login_required, login_user
|
||||
from app.blueprints.auth.forms import LoginForm
|
||||
from app.models import Corpus, User
|
||||
from . import bp
|
||||
from app import db
|
||||
|
||||
|
||||
@bp.route('/', methods=['GET', 'POST'])
|
||||
@ -72,6 +73,16 @@ def terms_of_use():
|
||||
)
|
||||
|
||||
|
||||
@bp.route('/accept-terms-of-use', methods=['POST'])
|
||||
@login_required
|
||||
def accept_terms_of_use():
|
||||
current_user.terms_of_use_accepted = True
|
||||
db.session.commit()
|
||||
|
||||
return jsonify('You accepted the terms of use'), 202
|
||||
|
||||
|
||||
|
||||
@bp.route('/social')
|
||||
@login_required
|
||||
def social():
|
||||
|
Reference in New Issue
Block a user