Skip to content

Instantly share code, notes, and snippets.

@joawan
Created September 14, 2021 13:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joawan/cea20c36c2b090f8eba72bfc8290d84a to your computer and use it in GitHub Desktop.
Save joawan/cea20c36c2b090f8eba72bfc8290d84a to your computer and use it in GitHub Desktop.
Initial handler
const handler = async (event) => {
console.log('Received request', event);
const body = JSON.parse(event.body);
if (body.challenge) {
return {
statusCode: 200,
headers: { 'Content-Type': 'text/plain' },
body: body.challenge
};
}
return { statusCode: 200 };
};
module.exports = { handler };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment