diff --git a/internal/sabnzbd/collector/collector.go b/internal/sabnzbd/collector/collector.go index af31f5e..c4f423c 100644 --- a/internal/sabnzbd/collector/collector.go +++ b/internal/sabnzbd/collector/collector.go @@ -189,7 +189,7 @@ func NewSabnzbdCollector(config *config.SabnzbdConfig) (*SabnzbdCollector, error func (s *SabnzbdCollector) doRequest(mode string, target interface{}) error { params := client.QueryParams{} params.Add("mode", mode) - return s.client.DoRequest("/sabnzbd/api", target, params) + return s.client.DoRequest("/api", target, params) } func (s *SabnzbdCollector) getQueueStats() (*model.QueueStats, error) { diff --git a/internal/sabnzbd/collector/collector_test.go b/internal/sabnzbd/collector/collector_test.go index 57b314d..e10d891 100644 --- a/internal/sabnzbd/collector/collector_test.go +++ b/internal/sabnzbd/collector/collector_test.go @@ -39,7 +39,7 @@ func newTestServer(t *testing.T, fn func(http.ResponseWriter, *http.Request)) (* func TestCollect(t *testing.T) { require := require.New(t) ts, err := newTestServer(t, func(w http.ResponseWriter, r *http.Request) { - require.Equal("/sabnzbd/api", r.URL.Path) + require.Equal("/api", r.URL.Path) require.Equal(API_KEY, r.URL.Query().Get("apikey")) require.Equal("json", r.URL.Query().Get("output")) })