Skip to content

Instantly share code, notes, and snippets.

@luandevpro
Created August 9, 2019 11:42
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 luandevpro/06a2a822d42f3f37ed04de51a24dd468 to your computer and use it in GitHub Desktop.
Save luandevpro/06a2a822d42f3f37ed04de51a24dd468 to your computer and use it in GitHub Desktop.
'use strict';
module.exports.hello = async (event, context, callback) => {
let request;
try {
request = JSON.parse(event.body);
} catch (e) {
return callback(null, {statusCode: 400, body: "cannot parse hasura event"});
}
const response = {
statusCode: 200,
body: JSON.stringify(request.event.data, null,2),
};
callback(null, response);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment