Skip to content

Commit

Permalink
Fix updownstatus API lambda handler export
Browse files Browse the repository at this point in the history
  • Loading branch information
rjaduthie committed Jan 20, 2023
1 parent 61bf2bb commit 014ecfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
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) => {
exports.handler = 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) => {
exports.handler = 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;

0 comments on commit 014ecfc

Please sign in to comment.