Skip to content

Commit

Permalink
refactor: Update LambdaStack to simplify code structure and handle en…
Browse files Browse the repository at this point in the history
…vironment variables
  • Loading branch information
FelipeCarillo committed Jul 21, 2024
1 parent 2081bcc commit 6c6ee0e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions iac/lib/lambda_stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export class LambdaStack extends Construct {
return string.toLowerCase().split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("_");
}

let layers: lambda.ILayerVersion[]
let function_lambda: lambda.Function;

function_lambda = new lambda_js.NodejsFunction(
Expand Down Expand Up @@ -80,9 +79,6 @@ export class LambdaStack extends Construct {
super(scope, id);

let origins = ["*"];
if (environment_variables["STAGE"] === "prod") {
origins = [environment_variables["DOMAIN"]];
}

this.create_moderator = this.create_lambda(
"create_moderator",
Expand Down

0 comments on commit 6c6ee0e

Please sign in to comment.