From d2a930bc4dd9d2ea382969c80f1243eb03946108 Mon Sep 17 00:00:00 2001 From: Philipp Muens Date: Mon, 4 Mar 2019 13:34:53 +0100 Subject: [PATCH] Remove unnecessary passing-in of stage name to naming function --- lib/plugins/aws/package/compile/events/apiGateway/lib/stage.js | 2 +- .../aws/package/compile/events/apiGateway/lib/stage.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plugins/aws/package/compile/events/apiGateway/lib/stage.js b/lib/plugins/aws/package/compile/events/apiGateway/lib/stage.js index addd2751a..f74532708 100644 --- a/lib/plugins/aws/package/compile/events/apiGateway/lib/stage.js +++ b/lib/plugins/aws/package/compile/events/apiGateway/lib/stage.js @@ -14,7 +14,7 @@ module.exports = { // NOTE: the DeploymentId is random, therefore we rely on prior usage here const deploymentId = this.apiGatewayDeploymentLogicalId; this.apiGatewayStageLogicalId = this.provider.naming - .getStageLogicalId(this.provider.getStage()); + .getStageLogicalId(); _.merge(this.serverless.service.provider.compiledCloudFormationTemplate.Resources, { [this.apiGatewayStageLogicalId]: { diff --git a/lib/plugins/aws/package/compile/events/apiGateway/lib/stage.test.js b/lib/plugins/aws/package/compile/events/apiGateway/lib/stage.test.js index 7ab1dfe5e..ea69cd03d 100644 --- a/lib/plugins/aws/package/compile/events/apiGateway/lib/stage.test.js +++ b/lib/plugins/aws/package/compile/events/apiGateway/lib/stage.test.js @@ -30,7 +30,7 @@ describe('#compileStage()', () => { awsCompileApigEvents.provider = provider; stage = awsCompileApigEvents.provider.getStage(); stageLogicalId = awsCompileApigEvents.provider.naming - .getStageLogicalId(stage); + .getStageLogicalId(); // setting up AWS X-Ray tracing awsCompileApigEvents.serverless.service.provider.tracing = { apiGateway: true,