mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
extract long expression into local variable
This commit is contained in:
parent
bedc937511
commit
46d1e72720
@ -13,7 +13,8 @@ module.exports = {
|
||||
this.serverless.instanceId
|
||||
);
|
||||
|
||||
_.merge(this.serverless.service.provider.compiledCloudFormationTemplate.Resources, {
|
||||
const resources = this.serverless.service.provider.compiledCloudFormationTemplate.Resources;
|
||||
_.merge(resources, {
|
||||
[this.websocketsDeploymentLogicalId]: {
|
||||
Type: 'AWS::ApiGatewayV2::Deployment',
|
||||
DependsOn: routeLogicalIds,
|
||||
@ -26,9 +27,7 @@ module.exports = {
|
||||
});
|
||||
const { apiGateway } = this.serverless.service.provider;
|
||||
if (apiGateway && apiGateway.websocketApiId) {
|
||||
this.serverless.service.provider.compiledCloudFormationTemplate.Resources[
|
||||
this.websocketsDeploymentLogicalId
|
||||
].Properties.StageName = this.provider.getStage();
|
||||
resources[this.websocketsDeploymentLogicalId].Properties.StageName = this.provider.getStage();
|
||||
}
|
||||
|
||||
_.merge(this.serverless.service.provider.compiledCloudFormationTemplate.Outputs, {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user