Skip to content
This repository has been archived by the owner on Nov 2, 2021. It is now read-only.

Commit

Permalink
Sigh
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyjbowers committed Jun 9, 2017
1 parent 18c4e04 commit 28e1f08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

settings = importlib.import_module('config.%s.settings' % utils.get_env())
app = Flask(__name__, template_folder=settings.TEMPLATE_PATH)
app.wsgi_app = VerifyJWTMiddleware(app.wsgi_app)
# app.wsgi_app = VerifyJWTMiddleware(app.wsgi_app)
app.debug=settings.DEBUG

@app.before_request
Expand All @@ -52,7 +52,7 @@ def create_entity(response):
Creates and returns an entity.
"""

user_email = request.environ.get('jwt_user_email', None) or 'test@test.dev'
user_email = request.environ.get('HTTP_X_GOOG_AUTHENTICATED_USER_EMAIL', None) or 'test@test.dev'

e = models.Entity.create(name=response['request']['name'],user_email=user_email)
en = models.EntityNote.create(entity=e.id,user_email=user_email,note="Created by script.")
Expand All @@ -70,7 +70,7 @@ def health():
@app.route('/', methods=['GET','POST'])
def index():
if request.method == 'GET':
payload = {"entities": [e.to_dict() for e in models.Entity.select()], "requester": request.environ.get('jwt_user_email', None) or 'fake@fake.dev'}
payload = {"entities": [e.to_dict() for e in models.Entity.select()], "requester": request.environ.get('HTTP_X_GOOG_AUTHENTICATED_USER_EMAIL', None) or 'fake@fake.dev'}
return jsonify(payload)

if request.method == 'POST':
Expand Down

0 comments on commit 28e1f08

Please sign in to comment.