Changed deprecated query.get and query.get_or_404 methods to other equivalents

This commit is contained in:
Marcin-Ramotowski
2025-03-29 20:12:47 +00:00
parent 7f36f67df4
commit 324416de8e
2 changed files with 9 additions and 5 deletions

View File

@ -35,7 +35,7 @@ def create_app(config_name="default"):
# Function to check if JWT token is revoked
@jwt.token_in_blocklist_loader
def check_if_token_revoked(jwt_header, jwt_payload):
token = RevokedToken.query.get(jwt_payload["jti"])
token = db.session.get(RevokedToken, jwt_payload["jti"])
return token is not None
# Global error handler