Skip to content

Commit 6736b18

Browse files
committed
BUG/MINOR: log_forwards: fix proper parent name and type checks
1 parent b29da3b commit 6736b18

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

handlers/dgram_bind.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func (h *CreateDgramBindHandlerImpl) Handle(params dgram_bind.CreateDgramBindPar
8080
return dgram_bind.NewCreateDgramBindDefault(int(*e.Code)).WithPayload(e)
8181
}
8282

83-
err = configuration.CreateDgramBind(params.Data.Name, params.Data, t, v)
83+
err = configuration.CreateDgramBind(params.LogForward, params.Data, t, v)
8484
if err != nil {
8585
e := misc.HandleError(err)
8686
return dgram_bind.NewCreateDgramBindDefault(int(*e.Code)).WithPayload(e)

handlers/log_target.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func (h *CreateLogTargetHandlerImpl) Handle(params log_target.CreateLogTargetPar
7575
}
7676

7777
pName := ""
78-
if params.ParentType == "frontend" || params.ParentType == "backend" || params.ParentType == "peers" {
78+
if params.ParentType == "frontend" || params.ParentType == "backend" || params.ParentType == "peers" || params.ParentType == "log_forward" {
7979
if params.ParentName == nil {
8080
msg := "parent_name in query is required"
8181
c := misc.ErrHTTPBadRequest

0 commit comments

Comments
 (0)