# HG changeset patch # User Kim Alvefur # Date 1554049355 -7200 # Node ID a200fbce0ecbd93fc23c1f1356277f4def7e5356 # Parent 37e89a76c7d757d2d0eed0729a7b4fdb5b4e5d9b mod_pubsub_github: Add some spacing to improve readability diff -r 37e89a76c7d7 -r a200fbce0ecb mod_pubsub_github/mod_pubsub_github.lua --- a/mod_pubsub_github/mod_pubsub_github.lua Sun Mar 31 18:21:22 2019 +0200 +++ b/mod_pubsub_github/mod_pubsub_github.lua Sun Mar 31 18:22:35 2019 +0200 @@ -12,12 +12,15 @@ }; local pubsub_service = module:depends("pubsub").service; + +-- configuration local default_node = module:get_option("github_node", "github"); local node_prefix = module:get_option_string("github_node_prefix", "github/"); local node_mapping = module:get_option_string("github_node_mapping"); local github_actor = module:get_option_string("github_actor") or true; local secret = module:get_option("github_secret"); +-- validation assert(secret, "Please set 'github_secret'"); local error_mapping = { @@ -43,6 +46,7 @@ module:log("debug", "Signature validation failed"); return 401; end + local data = json.decode(request.body); if not data then response.status_code = 400;