Created
September 14, 2021 13:12
-
-
Save joawan/cea20c36c2b090f8eba72bfc8290d84a to your computer and use it in GitHub Desktop.
Initial handler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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