Fixed the example in the documentation of the login_required decorator.

This commit is contained in:
依瑪貓 2022-12-06 22:59:13 +08:00
parent d78093ab53
commit b348c872dc

View File

@ -62,6 +62,7 @@ class DigestAuth:
:: ::
@app.get("/admin")
@auth.login_required @auth.login_required
def admin(): def admin():
return f"Hello, {g.user.username}!" return f"Hello, {g.user.username}!"