--- 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