Skip to content

Instantly share code, notes, and snippets.

@DennisAlund
Created December 24, 2017 04:01
Show Gist options
  • Select an option

  • Save DennisAlund/62045dd3881151dc95865cd174677da5 to your computer and use it in GitHub Desktop.

Select an option

Save DennisAlund/62045dd3881151dc95865cd174677da5 to your computer and use it in GitHub Desktop.
Gist for medium article https://medium.com/evenbit/63b847fbcb1f
export const cronEndpoint = functions.https.onRequest((request, response) => {
if (functions.config().cron.apikey !== request.body.key) {
response.status(401).send("I'm sorry Dave, I'm afraid I can't do that");
return;
}
response.status(200).send("The time is now.");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment