flaskserver: Load json python 3 compatible.

This commit is contained in:
derAnfaenger 2017-08-15 12:01:47 +02:00 committed by Tim Abbott
parent 47ba08ff5c
commit 6c026c84aa

View file

@ -73,7 +73,7 @@ def handle_bot(bot):
# TODO: Handle stateful bots properly. # TODO: Handle stateful bots properly.
state_handler = StateHandler() state_handler = StateHandler()
event = json.loads(request.data) event = request.get_json(force=True)
message_handler.handle_message(message=event["message"], message_handler.handle_message(message=event["message"],
bot_handler=restricted_client, bot_handler=restricted_client,
state_handler=state_handler) state_handler=state_handler)