From b8d8ee456035b1fff50f358440340cb376049e80 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 30 Mar 2022 09:28:45 +0200 Subject: [PATCH] fix: Persistent storage on webhooks --- src/lib/database/applications.ts | 3 ++- src/routes/webhooks/github/events.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/database/applications.ts b/src/lib/database/applications.ts index 317793e9a..ad03ed7c0 100644 --- a/src/lib/database/applications.ts +++ b/src/lib/database/applications.ts @@ -78,7 +78,8 @@ export async function getApplicationWebhook({ projectId, branch }) { destinationDocker: true, settings: true, gitSource: { include: { githubApp: true, gitlabApp: true } }, - secrets: true + secrets: true, + persistentStorage: true } }); if (!application) { diff --git a/src/routes/webhooks/github/events.ts b/src/routes/webhooks/github/events.ts index 9f278122d..435146a8b 100644 --- a/src/routes/webhooks/github/events.ts +++ b/src/routes/webhooks/github/events.ts @@ -53,8 +53,8 @@ export const post: RequestHandler = async (event) => { 'sha256=' + hmac.update(JSON.stringify(body)).digest('hex'), 'utf8' ); - const checksum = Buffer.from(githubSignature, 'utf8'); if (!dev) { + const checksum = Buffer.from(githubSignature, 'utf8'); if (checksum.length !== digest.length || !crypto.timingSafeEqual(digest, checksum)) { return { status: 500,