From 18596bd504ec30b162e524889e8db7a39de25c1d Mon Sep 17 00:00:00 2001 From: SvyatoslavArtymovych Date: Fri, 28 Apr 2023 14:33:46 +0300 Subject: [PATCH] hotfix: Add login_required to /home --- app/views/home.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/home.py b/app/views/home.py index 865072a..05bc58a 100644 --- a/app/views/home.py +++ b/app/views/home.py @@ -2,7 +2,7 @@ from flask import ( Blueprint, render_template, ) -from flask_login import current_user +from flask_login import current_user, login_required from app import models as m @@ -10,6 +10,7 @@ bp = Blueprint("home", __name__, url_prefix="/home") @bp.route("/", methods=["GET"]) +@login_required def get_all(): books: m.Book = m.Book.query.order_by(m.Book.id).limit(5) sections: m.Section = m.Section.query.order_by(m.Section.id).limit(5)