'Mark all notifications for a User as read.'

@staticmethod
def mark_all_user_notification_as_read(user):

    unread_notifs = Notification.query.filter_by(user=user, is_read=False)
    for notif in unread_notifs:
        notif.is_read = True
        db.session.add(notif)
    db.session.commit()
