@@ -75,10 +75,6 @@ const getSlackChannelId = (
7575 return CORE_FEEBACKS_CHANNEL_ID ;
7676} ;
7777
78- const spreadSheetsIds = {
79- forLater : '1NAUTsIcReVylWPby5K0omXWZpgjd9bjxE8V2J-dwPyc' ,
80- } ;
81-
8278// Setup of the slack bot (taken from https://slack.dev/bolt-js/deployments/aws-lambda)
8379const awsLambdaReceiver = new AwsLambdaReceiver ( {
8480 signingSecret : process . env . SLACK_SIGNING_SECRET ! ,
@@ -100,7 +96,7 @@ app.action<BlockAction<ButtonAction>>('delete_action', async ({ ack, body, clien
10096 const channelId = channel ?. id ;
10197
10298 if ( ! channelId ) {
103- throw Error ( 'feedback-management: Unknown channel Id' ) ;
99+ throw new Error ( 'feedback-management: Unknown channel Id' ) ;
104100 }
105101 await client . chat . delete ( {
106102 channel : channelId ,
@@ -113,13 +109,12 @@ app.action<BlockAction<ButtonAction>>('delete_action', async ({ ack, body, clien
113109 }
114110} ) ;
115111
116- // eslint-disable-next-line import/prefer-default-export
117112export const handler : Handler = async ( event , context , callback ) => {
118113 if ( event . httpMethod !== 'POST' ) {
119114 return { statusCode : 404 } ;
120115 }
121116 try {
122- const { payload } = querystring . parse ( event . body ) ;
117+ const { payload } = querystring . parse ( event . body ?? '' ) as { payload : any } ;
123118 const data = JSON . parse ( payload ) ;
124119
125120 if ( data . callback_id === 'send_feedback' ) {
0 commit comments