From 137f7a9e469a9801712af9515e7d93a158eabf49 Mon Sep 17 00:00:00 2001 From: hae-proj <102935858+hae-proj@users.noreply.github.com> Date: Fri, 3 May 2024 12:57:03 +0900 Subject: [PATCH] Update hello_webhook.py - Add "message = data['data']" at line 59 - Edit LOGGER.info display message at line 54,57,60 --- python/examples/orbit/webhook/hello_webhook.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/examples/orbit/webhook/hello_webhook.py b/python/examples/orbit/webhook/hello_webhook.py index acd3615a5..7e8340444 100644 --- a/python/examples/orbit/webhook/hello_webhook.py +++ b/python/examples/orbit/webhook/hello_webhook.py @@ -51,12 +51,13 @@ def webhook_listener() -> Response: # Check if the incoming data contains a message specific to payload types if data['type'] == "ACTION_COMPLETED": message = data['data'] - LOGGER.info("ACTION_COMPLETED: ", message) + LOGGER.info("ACTION_COMPLETED: %s", message) elif data['type'] == "ACTION_COMPLETED_WITH_ALERT": message = data['data'] - LOGGER.info("ACTION_COMPETED_WITH_ALERT: ", message) + LOGGER.info("ACTION_COMPETED_WITH_ALERT: %s", message) elif data['type'] == "TEST": - LOGGER.info("TEST", message) + message = data['data'] + LOGGER.info("TEST: %s", message) else: # If the 'type' field is not recognized, return a 400 Bad Request return jsonify({"error": "Unrecognized payload type"}), 400