mirror of
https://github.com/logos-co/open-law.git
synced 2025-03-02 23:40:31 +00:00
hotfix: Add login_required to /home
This commit is contained in:
parent
9c50679205
commit
18596bd504
@ -2,7 +2,7 @@ from flask import (
|
|||||||
Blueprint,
|
Blueprint,
|
||||||
render_template,
|
render_template,
|
||||||
)
|
)
|
||||||
from flask_login import current_user
|
from flask_login import current_user, login_required
|
||||||
|
|
||||||
from app import models as m
|
from app import models as m
|
||||||
|
|
||||||
@ -10,6 +10,7 @@ bp = Blueprint("home", __name__, url_prefix="/home")
|
|||||||
|
|
||||||
|
|
||||||
@bp.route("/", methods=["GET"])
|
@bp.route("/", methods=["GET"])
|
||||||
|
@login_required
|
||||||
def get_all():
|
def get_all():
|
||||||
books: m.Book = m.Book.query.order_by(m.Book.id).limit(5)
|
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)
|
sections: m.Section = m.Section.query.order_by(m.Section.id).limit(5)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user