Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs-infra] move feedback to ESM #41381

Merged
merged 4 commits into from
Mar 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const querystring = require('node:querystring');
const { App, AwsLambdaReceiver } = require('@slack/bolt');
const { JWT } = require('google-auth-library');
const { sheets } = require('@googleapis/sheets');
import querystring from 'node:querystring';
import { App, AwsLambdaReceiver } from '@slack/bolt';
import { JWT } from 'google-auth-library';
import { sheets } from '@googleapis/sheets';

const X_FEEBACKS_CHANNEL_ID = 'C04U3R2V9UK';
const JOY_FEEBACKS_CHANNEL_ID = 'C050VE13HDL';
Expand Down Expand Up @@ -122,11 +122,8 @@ app.action('save_message', async ({ ack, body, client, logger }) => {
}
});

/**
* @param {object} event
* @param {object} context
*/
exports.handler = async (event, context, callback) => {
// eslint-disable-next-line import/prefer-default-export
export const handler = async (event, context, callback) => {
if (event.httpMethod !== 'POST') {
return { statusCode: 404 };
}
Expand Down Expand Up @@ -227,8 +224,8 @@ from ${commmentSectionURL}
unfurl_media: false,
});
} else {
const handler = await awsLambdaReceiver.start();
return handler(event, context, callback);
const awsHandler = await awsLambdaReceiver.start();
return awsHandler(event, context, callback);
}
} catch (error) {
// eslint-disable-next-line no-console
Expand Down