mirror of
https://github.com/spacebarchat/server.git
synced 2026-03-31 18:05:43 +00:00
fix: send 204 even if event is invalid (discord does this, idk why)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user