فهرست منبع

add returntype

zahmis 5 سال پیش
والد
کامیت
626df76145
1فایلهای تغییر یافته به همراه2 افزوده شده و 3 حذف شده
  1. 2 3
      packages/slack/src/middlewares/protect-reply-attack.ts

+ 2 - 3
packages/slack/src/middlewares/protect-reply-attack.ts

@@ -1,9 +1,8 @@
 import { createHmac, timingSafeEqual } from 'crypto';
 import { stringify } from 'qs';
 
-export const protectReplyAttack = (req, res, next) => {
-// protect against replay attacks
-
+export const protectReplyAttack = (req, res, next):Record<string, any>| void => {
+  // protect against replay attacks
   // take out slackSignature and timestamp from header
   const slackSignature = req.headers['x-slack-signature'];
   const timestamp = req.headers['x-slack-request-timestamp'];