summary refs log tree commit diff
diff options
context:
space:
mode:
authorCyber <cyber.hf18@gmail.com>2025-12-02 11:54:20 +0100
committerGitHub <noreply@github.com>2025-12-02 11:54:20 +0100
commitcd30b0a65696b41cc2eec47596d45d0f7a7ed706 (patch)
tree145da602dfde10c0d5c8b3bd246fb5249ea63ea2
parentMerge pull request #1418 from CyberL1/refactor/github-webhook-embeds (diff)
parentfix: send 204 even if event is invalid (discord does this, idk why) (diff)
downloadserver-ts-cd30b0a65696b41cc2eec47596d45d0f7a7ed706.tar.xz
Merge pull request #1419 from CyberL1/fix/send-204
-rw-r--r--src/api/routes/webhooks/#webhook_id/#token/github.ts4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/api/routes/webhooks/#webhook_id/#token/github.ts b/src/api/routes/webhooks/#webhook_id/#token/github.ts

index a85f4b6b..5baf4e7b 100644 --- a/src/api/routes/webhooks/#webhook_id/#token/github.ts +++ b/src/api/routes/webhooks/#webhook_id/#token/github.ts
@@ -355,10 +355,8 @@ const parseGitHubWebhook = (req: Request, res: Response, next: NextFunction) => }, ]; break; - case "ping": - return res.status(204); default: - return res.send(500); + return res.status(204).end(); // Yes, discord sends 204 even on invalid event } req.body = discordPayload;