mirror of
https://github.com/onedr0p/exportarr.git
synced 2026-02-06 10:57:32 +00:00
fix-263: remove hardcoded /sabnzbd from api path (#275)
Signed-off-by: Russell Troxel <russell@troxel.io>
This commit is contained in:
parent
793371b2a3
commit
8161da029e
@ -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) {
|
||||
|
||||
@ -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"))
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user