diff options
Diffstat (limited to 'app/routes')
-rw-r--r-- | app/routes/auth_routes.py | 4 | ||||
-rw-r--r-- | app/routes/links_routes.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/routes/auth_routes.py b/app/routes/auth_routes.py index 3054e22..ceb68b1 100644 --- a/app/routes/auth_routes.py +++ b/app/routes/auth_routes.py @@ -33,7 +33,7 @@ async def login_for_access_token( detail="Incorrect username or password", headers={"WWW-Authenticate": "Bearer"}, ) - access_token_expires = timedelta(minutes=15) + access_token_expires = timedelta(minutes=1) access_token = create_access_token( data={"sub": user.id, "username": user.username, "refresh": False}, expires_delta=access_token_expires, @@ -63,7 +63,7 @@ async def refresh_access_token( """ Return a new access token if the refresh token is valid """ - access_token_expires = timedelta(minutes=30) + access_token_expires = timedelta(minutes=1) access_token = create_access_token( data={"sub": current_user.id, "refresh": False}, expires_delta=access_token_expires, diff --git a/app/routes/links_routes.py b/app/routes/links_routes.py index 833c699..874f3c2 100644 --- a/app/routes/links_routes.py +++ b/app/routes/links_routes.py @@ -16,7 +16,7 @@ from app.util.authentication import get_current_user router = APIRouter(prefix="/links", tags=["links"]) -@router.get("/", summary="Get all of the links associated with your account") +@router.get("", summary="Get all of the links associated with your account") async def get_links( current_user: Annotated[User, Depends(get_current_user)], db=Depends(get_db), @@ -35,7 +35,7 @@ async def get_links( return links -@router.post("/", summary="Create a new link") +@router.post("", summary="Create a new link") async def create_link( url: URLSchema, current_user: Annotated[User, Depends(get_current_user)], |