refactor: use getWorkerProofUrl

This commit is contained in:
Derrick Hammer 2023-06-09 15:48:41 -04:00
parent 85a02952df
commit 160a9f7ebb
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@ func Download(hash string) (io.Reader, error) {
tusItem := db.Get().Table("tus").Where(&model.Tus{Hash: hash}).Row() tusItem := db.Get().Table("tus").Where(&model.Tus{Hash: hash}).Row()
if uploadItem.Err() == nil { if uploadItem.Err() == nil {
fetch, err := client.R().SetDoNotParseResponse(true).Get(fmt.Sprintf("/worker/objects/%s", hash)) fetch, err := client.R().SetDoNotParseResponse(true).Get(getWorkerProofUrl(hash))
if err != nil { if err != nil {
logger.Get().Error(ErrFailedFetchObject.Error(), zap.Error(err)) logger.Get().Error(ErrFailedFetchObject.Error(), zap.Error(err))
return nil, ErrFailedFetchObject return nil, ErrFailedFetchObject