Cloud Datastoreに保存したSendGridのWebhookを参照するGoogle Cloud Functions API

やりたいこと 前回、SendGridのWebhookをDatastoreに貯めるところまで進めた。 tminami.hatenablog.com 今回は保存したデータを取得するAPIを、同じくGoogle Cloud Functionsでつくる。 Cloud Functionsの設定等は前記事参照。 ソース index.js const Buffer = require('safe-buffer').Buffer; const Datastore = require(…