diff --git a/broker/ntgvision.go b/broker/ntgvision.go index 05f5cc9..c47ed1c 100644 --- a/broker/ntgvision.go +++ b/broker/ntgvision.go @@ -109,7 +109,7 @@ func (ntgJob *ntgVisionJob) JobInfo() (ntgVisionJobInfo, error) { func (ntg NTGVision) searchJob(id int64) (io.ReadCloser, error) { time.Sleep(config.Get().Interval.JobInfo.Get()) - request, err := http.NewRequest(http.MethodGet, fmt.Sprintf(config.Get().Brokers.NTG.LoadPageURIFormat, id), nil) + request, err := http.NewRequest(http.MethodGet, fmt.Sprintf(config.Get().Brokers.NTG.LoadPageAPIURIFormat, id), nil) if err != nil { return nil, err } diff --git a/config.json b/config.json index 54f1807..b39b138 100644 --- a/config.json +++ b/config.json @@ -75,6 +75,7 @@ "JobInfo": true, "Mock": true, "LoadPageURIFormat": "https://ntgvision.com/LoadDetails?loadId=%d", + "LoadPageAPIURIFormat": "https://ntgvision.com/api/v1/load/LoadDetails?loadId==%d", "Username": "noeasyrunstrucking@gmail.com", "Password": "thumper1234" } diff --git a/config/config.go b/config/config.go index 86cd07a..bbb89fc 100644 --- a/config/config.go +++ b/config/config.go @@ -65,11 +65,12 @@ type Config struct { Once bool Brokers struct { NTG struct { - JobInfo bool - Mock bool - LoadPageURIFormat string - Username string - Password string + JobInfo bool + Mock bool + LoadPageURIFormat string + LoadPageAPIURIFormat string + Username string + Password string } }