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

Fix updownstatus API lambda handler export #33

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions resources/serverstatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const ec2Client = new EC2Client({ region: REGION });
/**
* Everything here has the assumption there is only one task.
*/
const handler: APIGatewayProxyHandler = async (event: APIGatewayEvent, context: Context) => {
export const handler: APIGatewayProxyHandler = async (event: APIGatewayEvent, context: Context) => {
console.log(`New getServerStatus request: ${JSON.stringify(event)}`);
console.log(`With context: ${JSON.stringify(context)}`);

Expand All @@ -50,7 +50,6 @@ const handler: APIGatewayProxyHandler = async (event: APIGatewayEvent, context:
};
};

export default handler;

async function getIPFunction() {

Expand Down
4 changes: 1 addition & 3 deletions resources/startstopserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const SERVICE_NAME = process.env.SERVICE_NAME;
const CLUSTER_ARN = process.env.CLUSTER_ARN;
const PASSWORD = process.env.PASSWORD;

const handler: APIGatewayProxyHandler = async (event: APIGatewayEvent, context: Context) => {
export const handler: APIGatewayProxyHandler = async (event: APIGatewayEvent, context: Context) => {
console.log("request: " + JSON.stringify(event));
let responseCode = 400;
let message = "authentication failed";
Expand Down Expand Up @@ -78,5 +78,3 @@ const handler: APIGatewayProxyHandler = async (event: APIGatewayEvent, context:
body: JSON.stringify(responseBody)
};
};

export default handler;