fix: need to set api path

This commit is contained in:
Derrick Hammer 2024-01-25 08:55:59 -05:00
parent 8f138a5df7
commit 6d8beb0331
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 11 additions and 0 deletions

View File

@ -25,6 +25,7 @@ import (
"go.uber.org/zap"
"io"
"lukechampine.com/blake3"
"net/url"
"strings"
"time"
)
@ -153,6 +154,16 @@ func (s *StorageServiceImpl) Init() error {
addr := s.portal.Config().GetString("core.sia.url")
passwd := s.portal.Config().GetString("core.sia.key")
addrURL, err := url.Parse(addr)
if err != nil {
return err
}
addrURL.Path = "/api"
addr = addrURL.String()
s.workerClient = workerClient.New(addr, passwd)
s.busClient = busClient.New(addr, passwd)