Fix/6272-6444-null-check-for-payload
@@ -10,6 +10,11 @@ export class ExtractGrowiUriFromReq implements IMiddleware {
use(@Req() req: Req & SlackOauthReq, @Res() res: Res, @Next() next: Next): void {
+ // There is no payload in the request from slack
+ if (req.body.payload == null) {
+ return next();
+ }
+
const payload = JSON.parse(req.body.payload);
// extract for modal