Updated functionalities

This commit is contained in:
2026-04-25 12:11:05 -04:00
parent 5a1c252607
commit a515df6a02
26 changed files with 417 additions and 107 deletions
+3 -1
View File
@@ -80,7 +80,9 @@ def index():
@bp.route('/<int:notif_id>/mark-read', methods=['POST'])
@login_required
def mark_read(notif_id):
notif = Notification.query.get_or_404(notif_id)
notif = db.session.get(Notification, notif_id)
if notif is None:
abort(404)
if notif.user_id != current_user.id:
abort(403)
notif.is_read = True