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="/")
|
||||
|
||||
|
||||
@app.get("/", response_class=HTMLResponse)
|
||||
@app.get("/")
|
||||
async def home(
|
||||
request: Request, user: Annotated[User, Depends(get_current_user_or_none)]
|
||||
) -> HTMLResponse:
|
||||
|
@ -220,5 +220,7 @@ async def home(
|
|||
|
||||
|
||||
@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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue