mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-23 17:29:05 +01:00
[Server] Fix bug
This commit is contained in:
parent
5a1f272026
commit
b620dc2fb1
@ -23,6 +23,7 @@ module.exports = async (app: express.Application) => {
|
||||
app.post('/hooks/github', (req, res, next) => {
|
||||
if ((new Buffer(req.headers['x-hub-signature'])).equals(new Buffer('sha1=' + crypto.createHmac('sha1', config.github_bot.hook_secret).update(JSON.stringify(req.body)).digest('hex')))) {
|
||||
handler.emit(req.headers['x-github-event'], req.body);
|
||||
res.sendStatus(200);
|
||||
} else {
|
||||
res.sendStatus(400);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user