Skip to content

Commit

Permalink
Codacy performance
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaOndieki committed Jul 5, 2018
1 parent c1e503b commit 3d465f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions ridemyway/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ def create_app(config_name):
app.jwt = JWTManager(app)
app.blacklist = set()

@app.jwt.token_in_blacklist_loader
def check_if_token_in_blacklist(decrypted_token):
jti = decrypted_token['jti']
return jti in app.blacklist
with app.app_context():
@app.jwt.token_in_blacklist_loader
def check_if_token_in_blacklist(decrypted_token):
jti = decrypted_token['jti']
return jti in app.blacklist

@app.route('/')
def api_docs():
Expand Down
2 changes: 1 addition & 1 deletion ridemyway/api/v2/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
for semantic error checks
Clean data without semantic errors is further handled by the controllers
"""

from flask import current_app as app
import json

from flask_restful import Resource, reqparse
Expand Down

0 comments on commit 3d465f8

Please sign in to comment.