From dff1ec9bc6c51701cea80f006d2a9779db7eca79 Mon Sep 17 00:00:00 2001 From: grossmj Date: Tue, 20 Apr 2021 19:54:55 +0930 Subject: [PATCH] Fix /users/me endpoint. --- gns3server/api/routes/controller/users.py | 2 +- gns3server/schemas/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gns3server/api/routes/controller/users.py b/gns3server/api/routes/controller/users.py index 84dff464..c830c8b5 100644 --- a/gns3server/api/routes/controller/users.py +++ b/gns3server/api/routes/controller/users.py @@ -171,7 +171,7 @@ async def delete_user( raise ControllerNotFoundError(f"User '{user_id}' not found") -@router.get("/users/me/", response_model=schemas.User) +@router.get("/me/", response_model=schemas.User) async def get_current_active_user(current_user: schemas.User = Depends(get_current_active_user)) -> schemas.User: """ Get the current active user. diff --git a/gns3server/schemas/config.py b/gns3server/schemas/config.py index d692cf9e..80f52add 100644 --- a/gns3server/schemas/config.py +++ b/gns3server/schemas/config.py @@ -23,7 +23,7 @@ class ControllerSettings(BaseModel): jwt_secret_key: str = None jwt_algorithm: str = "HS256" - jwt_access_token_expire_minutes: int = 1440 + jwt_access_token_expire_minutes: int = 1440 # 24 hours class Config: validate_assignment = True