fix(AWS SNS Trigger Node): add missing jsonParse import (#4463)

* fix(AwsSnsTrigger): add missing jsonParse import

* add clear typings for req.rawBody and getHeaderData()
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2022-10-28 11:24:11 +02:00
committed by GitHub
parent d9a41ea9d7
commit e6ec134cf3
16 changed files with 17 additions and 30 deletions

View File

@@ -236,7 +236,6 @@ class App {
// Make sure that each request has the "parsedUrl" parameter
this.app.use((req: express.Request, res: express.Response, next: express.NextFunction) => {
(req as ICustomRequest).parsedUrl = parseUrl(req);
// @ts-ignore
req.rawBody = Buffer.from('', 'base64');
next();
});
@@ -246,7 +245,6 @@ class App {
bodyParser.json({
limit: '16mb',
verify: (req, res, buf) => {
// @ts-ignore
req.rawBody = buf;
},
}),
@@ -269,7 +267,6 @@ class App {
bodyParser.text({
limit: '16mb',
verify: (req, res, buf) => {
// @ts-ignore
req.rawBody = buf;
},
}),
@@ -280,7 +277,6 @@ class App {
bodyParser.urlencoded({
extended: false,
verify: (req, res, buf) => {
// @ts-ignore
req.rawBody = buf;
},
}),