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

@@ -622,7 +622,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();
});
@@ -632,7 +631,6 @@ class App {
bodyParser.json({
limit: `${this.payloadSizeMax}mb`,
verify: (req, res, buf) => {
// @ts-ignore
req.rawBody = buf;
},
}),
@@ -649,7 +647,6 @@ class App {
explicitArray: false, // Only put properties in array if length > 1
},
verify: (req: express.Request, res: any, buf: any) => {
// @ts-ignore
req.rawBody = buf;
},
}),
@@ -659,7 +656,6 @@ class App {
bodyParser.text({
limit: `${this.payloadSizeMax}mb`,
verify: (req, res, buf) => {
// @ts-ignore
req.rawBody = buf;
},
}),
@@ -685,7 +681,6 @@ class App {
limit: `${this.payloadSizeMax}mb`,
extended: false,
verify: (req, res, buf) => {
// @ts-ignore
req.rawBody = buf;
},
}),