From 9d8320e5eaad7d19eb58700662c2bf36e848e55e Mon Sep 17 00:00:00 2001 From: David Osztertag Date: Tue, 18 Jul 2017 17:53:06 +0200 Subject: [PATCH] Send both build and config in SenderAllowed --- plugins/sender/plugin.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/sender/plugin.go b/plugins/sender/plugin.go index ffd19802c..313f24ed7 100644 --- a/plugins/sender/plugin.go +++ b/plugins/sender/plugin.go @@ -18,7 +18,11 @@ func NewRemote(endpoint string) model.SenderService { func (p *plugin) SenderAllowed(user *model.User, repo *model.Repo, build *model.Build, conf *model.Config) (bool, error) { path := fmt.Sprintf("%s/senders/%s/%s/%s/verify", p.endpoint, repo.Owner, repo.Name, build.Sender) - err := internal.Send("POST", path, build, nil) + data := map[string]interface{}{ + "build": build, + "config": conf, + } + err := internal.Send("POST", path, &data, nil) if err != nil { return false, err }