Skip to content

Commit

Permalink
fix panic
Browse files Browse the repository at this point in the history
  • Loading branch information
djelusic committed Mar 1, 2022
1 parent 9ada01b commit 683aef1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions cli/controller/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ func (d *Deploy) callBackend() error {

func (d *Deploy) backendRequest() dto.DeployRequest {
req := dto.DeployRequest{
ProjectName: d.stage.Project().Name,
NodeBucket: d.stage.Node().Bucket,
FunctionsForUpdate: nil,
StageTemplate: nil,
Expand Down
2 changes: 1 addition & 1 deletion node/api/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func New() *Deploy {
}

func (d *Deploy) Invoke(ctx context.Context, req dto.DeployRequest) (*dto.DeployResponse, error) {
ok, _ := domain.IsAuthorizedForProject(ctx, req.StageTemplate.Project)
ok, _ := domain.IsAuthorizedForProject(ctx, req.ProjectName)
if !ok {
return nil, domain.ErrNotAuthorized
}
Expand Down
1 change: 1 addition & 0 deletions node/dto/dto.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
)

type DeployRequest struct {
ProjectName string
NodeBucket string
FunctionsForUpdate []Function
StageTemplate *StageTemplate
Expand Down

0 comments on commit 683aef1

Please sign in to comment.