diff --git a/resources/serverstatus.ts b/resources/serverstatus.ts index 648acb1..4adb94a 100644 --- a/resources/serverstatus.ts +++ b/resources/serverstatus.ts @@ -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)}`); @@ -50,7 +50,6 @@ const handler: APIGatewayProxyHandler = async (event: APIGatewayEvent, context: }; }; -export default handler; async function getIPFunction() { diff --git a/resources/startstopserver.ts b/resources/startstopserver.ts index e20dd15..750c03a 100644 --- a/resources/startstopserver.ts +++ b/resources/startstopserver.ts @@ -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"; @@ -78,5 +78,3 @@ const handler: APIGatewayProxyHandler = async (event: APIGatewayEvent, context: body: JSON.stringify(responseBody) }; }; - -export default handler;