🐛 Fix bug with Webhook-Process

This commit is contained in:
Jan Oberhauser
2022-02-20 16:44:30 +01:00
parent 3305247984
commit ff20a58c70
3 changed files with 7 additions and 5 deletions

View File

@@ -32,6 +32,7 @@ import {
} from '.';
import * as config from '../config';
import { WEBHOOK_METHODS } from './WebhookHelpers';
// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-unsafe-call
require('body-parser-xml')(bodyParser);
@@ -70,7 +71,7 @@ export function registerProductionWebhooks() {
return;
}
if (!this.webhookMethods.includes(method)) {
if (!WEBHOOK_METHODS.includes(method)) {
ResponseHelper.sendErrorResponse(res, new Error(`The method ${method} is not supported.`));
return;
}
@@ -120,7 +121,7 @@ export function registerProductionWebhooks() {
// if (method === 'OPTIONS') {
// }
if (!this.webhookMethods.includes(method)) {
if (!WEBHOOK_METHODS.includes(method)) {
ResponseHelper.sendErrorResponse(res, new Error(`The method ${method} is not supported.`));
return;
}