8000 Revert import change for consistency. · SWCodeG/testing-python-apps@97e91a3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 97e91a3

Browse files
< 8000 div data-testid="author-avatar" class="Box-sc-g0xbh4-0 hKWjvQ">jslvtrjslvtr
committed
Revert import change for consistency.
1 parent 5fbc910 commit 97e91a3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

section4/video_code/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from flask import Flask, jsonify
44
from flask_restful import Api
5-
import flask_jwt
5+
from flask_jwt import JWT, JWTError
66

77
from security import authenticate, identity
88
from resources.user import UserRegister
@@ -19,7 +19,7 @@
1919
app.secret_key = 'jose'
2020
api = Api(app)
2121

22-
jwt = flask_jwt.JWT(app, authenticate, identity) # /auth
22+
jwt = JWT(app, authenticate, identity) # /auth
2323

2424
api.add_resource(Store, '/store/<string:name>')
2525
api.add_resource(Item, '/item/<string:name>')
@@ -29,7 +29,7 @@
2929
api.add_resource(UserRegister, '/register')
3030

3131

32-
@app.errorhandler(flask_jwt.JWTError)
32+
@app.errorhandler(JWTError)
3333
def auth_error(err):
3434
return jsonify({'message': 'Could not authorize. Did you include a valid Authorization header?'}), 401
3535

0 commit comments

Comments
 (0)
0