import { Webhook } from "standardwebhooks";
const webhook = new Webhook(process.env.SCHOOLCUES_WEBHOOK_SECRET);
// Throws if the signature or timestamp doesn't check out.
const event = webhook.verify(rawBody, {
"webhook-id": request.headers["webhook-id"],
"webhook-timestamp": request.headers["webhook-timestamp"],
"webhook-signature": request.headers["webhook-signature"],
});