generated from nhcarrigan/template
fix: forgot to save
This commit is contained in:
@ -130,22 +130,8 @@ export const instantiateServer = (): void => {
|
||||
}; }>(
|
||||
"/entitlement",
|
||||
async(request, response) => {
|
||||
const signature = req.headers["x-signature-ed25519"];
|
||||
const timestamp = req.headers["x-signature-timestamp"];
|
||||
const rawBody = JSON.stringify(req.body);
|
||||
|
||||
const isValid = await verify(
|
||||
rawBody,
|
||||
signature,
|
||||
timestamp,
|
||||
this.client.publicKey,
|
||||
crypto.webcrypto.subtle,
|
||||
);
|
||||
|
||||
const isValid = await validateWebhook(request);
|
||||
if (!isValid) {
|
||||
return res.code(401).send("Invalid signature");
|
||||
}
|
||||
if (!validateWebhook(request)) {
|
||||
await response.status(401).send({ success: false });
|
||||
void sendDiscord(
|
||||
"[NOTIFICATION]: Entitlement Event",
|
||||
|
Reference in New Issue
Block a user