diff --git a/src/server/utils/apiGithub.ts b/src/server/utils/apiGithub.ts index 06142a8..7b0915f 100644 --- a/src/server/utils/apiGithub.ts +++ b/src/server/utils/apiGithub.ts @@ -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'); } /** diff --git a/src/server/utils/apiGitlab.ts b/src/server/utils/apiGitlab.ts index c9c4c82..e2df755 100644 --- a/src/server/utils/apiGitlab.ts +++ b/src/server/utils/apiGitlab.ts @@ -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'); } /**