Skip to content

Instantly share code, notes, and snippets.

@danbills
Created June 27, 2018 18:46
Show Gist options
  • Save danbills/91b5b46ec1fb7537a4f6ebe800f2eb37 to your computer and use it in GitHub Desktop.
Save danbills/91b5b46ec1fb7537a4f6ebe800f2eb37 to your computer and use it in GitHub Desktop.
fake martha
exports.helloWorld = (req, res) => {
// Example input: {"message": "Hello!"}
if (req.body.dosUrl === undefined) {
// This is an error case, as "message" is required.
res.status(400).send('No message defined!');
} else {
// Everything is okay.
console.log(req.body.dosUrl);
var response = {};
response["dos"] = req.body.dosUrl.replace("dos","gs");
response["sa"] = "sa";
res.status(200).send(response);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment