Skip to content

Commit

Permalink
Fix auth webhooks with Nodejs v16.x
Browse files Browse the repository at this point in the history
  • Loading branch information
francoispluchino committed Aug 18, 2022
1 parent 9f2b03a commit 0a3c785
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/server/utils/apiGithub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {Request} from 'express';
* @return {boolean}
*/
export function isGithubEvent(req: Request): boolean {
return req.hasOwnProperty('headers') && req.headers.hasOwnProperty('x-github-event');
return req.headers.hasOwnProperty('x-github-event');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/server/utils/apiGitlab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {Request} from 'express';
* @return {boolean}
*/
export function isGitlabEvent(req: Request): boolean {
return req.hasOwnProperty('headers') && req.headers.hasOwnProperty('x-gitlab-event');
return req.headers.hasOwnProperty('x-gitlab-event');
}

/**
Expand Down

0 comments on commit 0a3c785

Please sign in to comment.