From 28fc58613f5fac90a59deb0d09034a04c09257e0 Mon Sep 17 00:00:00 2001 From: bruk Date: Fri, 22 Nov 2024 14:16:18 -0500 Subject: [PATCH] linter ignore type check on api_jwt_auth.current_user --- api/src/api/users/user_routes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/api/users/user_routes.py b/api/src/api/users/user_routes.py index fcf112188..1223149e4 100644 --- a/api/src/api/users/user_routes.py +++ b/api/src/api/users/user_routes.py @@ -6,7 +6,7 @@ from src.api.route_utils import raise_flask_error from src.api.users import user_schemas from src.api.users.user_blueprint import user_blueprint -from src.api.users.user_schemas import LogoutResponseSchema +from src.api.users.user_schemas import UserTokenLogoutResponseSchema from src.auth.api_jwt_auth import api_jwt_auth from src.auth.api_key_auth import api_key_auth from src.db.models.user_models import UserTokenSession @@ -42,14 +42,14 @@ def user_token(x_oauth_login_gov: dict) -> response.ApiResponse: @user_blueprint.post("/token/logout") -@user_blueprint.output(LogoutResponseSchema) +@user_blueprint.output(UserTokenLogoutResponseSchema) @user_blueprint.doc(responses=[200, 401]) @user_blueprint.auth_required(api_jwt_auth) @flask_db.with_db_session() def user_token_logout(db_session: db.Session) -> response.ApiResponse: logger.info("POST /v1/users/token/logout") - user_token_session: UserTokenSession = api_jwt_auth.get("current_user") + user_token_session: UserTokenSession = api_jwt_auth.current_user # type: ignore with db_session.begin(): user_token_session.is_valid = False db_session.add(user_token_session)