Merge pull request #2118 from avatao/senderallowed-post [ci skip]

Send both build and config in SenderAllowed
This commit is contained in:
Brad Rydzewski 2017-07-24 23:38:44 -04:00 committed by GitHub
commit f7cb9986a6

View file

@ -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
}