aboutsummaryrefslogtreecommitdiff
path: root/app/main.py
diff options
context:
space:
mode:
authorParker <contact@pkrm.dev>2024-11-06 01:08:04 -0600
committerParker <contact@pkrm.dev>2024-11-06 01:08:04 -0600
commit4c1dd74db3f9ac37134db13c8e5a499a9f37594a (patch)
tree5f9b72c25b66586e22d18ec5fd55e262e6eb3e2c /app/main.py
parenteadc9289338e8537c1ee70274007eea2dc395bde (diff)
Lots more functionality - working towards UI
Diffstat (limited to 'app/main.py')
-rw-r--r--app/main.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/main.py b/app/main.py
index 0ac6d09..4280275 100644
--- a/app/main.py
+++ b/app/main.py
@@ -5,11 +5,11 @@ from fastapi.templating import Jinja2Templates
from app.routes.auth_routes import router as auth_router
from app.routes.links_routes import router as links_router
from app.routes.user_routes import router as user_router
-from typing import Annotated
+from typing import Annotated, Union
from fastapi.exceptions import HTTPException
from starlette.status import HTTP_404_NOT_FOUND
-from app.util.authentication import get_current_user_from_cookie
+from app.util.authentication import get_current_user
from app.util.db_dependency import get_db
from app.util.log import log
from app.schemas.auth_schemas import User
@@ -55,10 +55,8 @@ async def signup(request: Request):
@app.get("/dashboard")
async def dashboard(
- response: Annotated[
- User, RedirectResponse, Depends(get_current_user_from_cookie)
- ],
request: Request,
+ response: Union[User, RedirectResponse] = Depends(get_current_user),
):
if isinstance(response, RedirectResponse):
return response