# HG changeset patch # User Kim Alvefur # Date 1535125607 -7200 # Node ID a65f4297264be66cbdb2a72f1dc260657cc3ef5c # Parent 0ccdd3f31435ad2df30879a73f62c50a7b01c5f1 mod_pubsub_github: Unpack request from event diff -r 0ccdd3f31435 -r a65f4297264b mod_pubsub_github/mod_pubsub_github.lua --- a/mod_pubsub_github/mod_pubsub_github.lua Fri Aug 24 19:45:11 2018 +0200 +++ b/mod_pubsub_github/mod_pubsub_github.lua Fri Aug 24 17:46:47 2018 +0200 @@ -8,7 +8,8 @@ local node = module:get_option("github_node", "github"); function handle_POST(event) - local data = json.decode(event.request.body); + local request = event.request; + local data = json.decode(request.body); if not data then return "Invalid JSON. From you of all people..."; end @@ -28,7 +29,7 @@ ); end - module:log("debug", "Handled POST: \n%s\n", tostring(event.request.body)); + module:log("debug", "Handled POST: \n%s\n", tostring(request.body)); return "Thank you Github!"; end