diff --git a/chainlink/node.go b/chainlink/node.go index 581f4249..97782f72 100644 --- a/chainlink/node.go +++ b/chainlink/node.go @@ -69,7 +69,7 @@ func (cl Node) TriggerJob(jobId string, data []byte) error { func (cl Node) sendJobrunTrigger(jobId string, data []byte) error { u := cl.Endpoint - u.Path = fmt.Sprintf("/v2/specs/%s/runs", jobId) + u.Path = fmt.Sprintf("/v2/jobs/%s/runs", jobId) request, err := http.NewRequest(http.MethodPost, u.String(), bytes.NewReader(data)) if err != nil { diff --git a/chainlink/node_test.go b/chainlink/node_test.go index 4a1030d6..52ba492a 100644 --- a/chainlink/node_test.go +++ b/chainlink/node_test.go @@ -44,7 +44,7 @@ func TestMain(m *testing.M) { return } - if r.URL.Path == fmt.Sprintf("/v2/specs/%s/runs", jobIdWPayload) { + if r.URL.Path == fmt.Sprintf("/v2/jobs/%s/runs", jobIdWPayload) { body, err := ioutil.ReadAll(r.Body) if err != nil { w.WriteHeader(http.StatusInternalServerError) @@ -55,7 +55,7 @@ func TestMain(m *testing.M) { w.WriteHeader(http.StatusBadRequest) return } - } else if r.URL.Path != fmt.Sprintf("/v2/specs/%s/runs", jobId) { + } else if r.URL.Path != fmt.Sprintf("/v2/jobs/%s/runs", jobId) { w.WriteHeader(http.StatusNotFound) return } diff --git a/store/database.go b/store/database.go index 9cd0d249..5feb18a5 100644 --- a/store/database.go +++ b/store/database.go @@ -158,7 +158,7 @@ func (client Client) prepareSubscription(rawSub *Subscription) (*Subscription, e return nil, err } case "agoric": - if err := client.db.Model(&sub).Related(&sub.Agoric).Error; err != nil { + if err := client.db.Model(&sub).Error; err != nil { return nil, err } }