Use middleware to clear notifications

Fixes #70
This commit is contained in:
rubenwardy
2020-07-10 22:23:52 +01:00
parent 1d8abd8f4b
commit b9386d5a47
6 changed files with 7 additions and 9 deletions

View File

@@ -92,3 +92,10 @@ def check_for_ban():
elif current_user.rank == models.UserRank.NOT_JOINED:
current_user.rank = models.UserRank.MEMBER
models.db.session.commit()
from .utils import clearNotifications
@app.before_request
def check_for_notifications():
if current_user.is_authenticated:
clearNotifications(request.path)