Create a string from bytes for Python 3

This commit is contained in:
Jeffrey Linwood
2017-05-22 16:46:31 -05:00
parent 22f8c5c00d
commit e910df61b1

2
app.py
View File

@@ -81,7 +81,7 @@ def token():
token.add_grant(chat_grant)
# Return token info as JSON
return jsonify(identity=identity, token=token.to_jwt())
return jsonify(identity=identity, token=token.to_jwt().decode('utf-8'))
# Notify - create a device binding from a POST HTTP request
@app.route('/register', methods=['POST'])