Skip to content

Commit

Permalink
BUG/MINOR: log_forwards: fix proper parent name and type checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mjuraga committed Nov 7, 2023
1 parent 136c729 commit 169393b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion handlers/dgram_bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (h *CreateDgramBindHandlerImpl) Handle(params dgram_bind.CreateDgramBindPar
return dgram_bind.NewCreateDgramBindDefault(int(*e.Code)).WithPayload(e)
}

err = configuration.CreateDgramBind(params.Data.Name, params.Data, t, v)
err = configuration.CreateDgramBind(params.LogForward, params.Data, t, v)
if err != nil {
e := misc.HandleError(err)
return dgram_bind.NewCreateDgramBindDefault(int(*e.Code)).WithPayload(e)
Expand Down
2 changes: 1 addition & 1 deletion handlers/log_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (h *CreateLogTargetHandlerImpl) Handle(params log_target.CreateLogTargetPar
}

pName := ""
if params.ParentType == "frontend" || params.ParentType == "backend" || params.ParentType == "peers" {
if params.ParentType == "frontend" || params.ParentType == "backend" || params.ParentType == "peers" || params.ParentType == "log_forward" {
if params.ParentName == nil {
msg := "parent_name in query is required"
c := misc.ErrHTTPBadRequest
Expand Down

0 comments on commit 169393b

Please sign in to comment.