Cosmetic
This commit is contained in:
parent
3e3db42468
commit
fa4032c0e6
1 changed files with 4 additions and 2 deletions
|
@ -204,7 +204,7 @@ async def logout(request: Request) -> RedirectResponse:
|
||||||
return RedirectResponse(url="/")
|
return RedirectResponse(url="/")
|
||||||
|
|
||||||
|
|
||||||
@app.get("/", response_class=HTMLResponse)
|
@app.get("/")
|
||||||
async def home(
|
async def home(
|
||||||
request: Request, user: Annotated[User, Depends(get_current_user_or_none)]
|
request: Request, user: Annotated[User, Depends(get_current_user_or_none)]
|
||||||
) -> HTMLResponse:
|
) -> HTMLResponse:
|
||||||
|
@ -220,5 +220,7 @@ async def home(
|
||||||
|
|
||||||
|
|
||||||
@app.get("/protected")
|
@app.get("/protected")
|
||||||
async def get_protected(user: Annotated[User, Depends(get_current_user)]):
|
async def get_protected(
|
||||||
|
user: Annotated[User, Depends(get_current_user)]
|
||||||
|
) -> PlainTextResponse:
|
||||||
return PlainTextResponse("Only authenticated users can see this")
|
return PlainTextResponse("Only authenticated users can see this")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue