Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
royroyee committed Jun 14, 2024
1 parent 9401719 commit 5fdbbec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 1 addition & 6 deletions api/packages/packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,12 @@ func DownloadPackage(ac *client.AlpaconClient, fileName string, dest string, pac
url = systemPackageEntryURL
}

type DownloadURL struct {
DownloadURL string `json:"download_url"`
}

var downloadURL DownloadURL

respBody, err := ac.SendGetRequest(utils.BuildURL(url, packageID, nil))
if err != nil {
return err
}

var downloadURL DownloadURL
err = json.Unmarshal(respBody, &downloadURL)
if err != nil {
return err
Expand Down
4 changes: 4 additions & 0 deletions api/packages/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ type SystemPackageDetail struct {
AddedAt string `json:"added_at"`
DownloadURL string `json:"download_url"`
}

type DownloadURL struct {
DownloadURL string `json:"download_url"`
}

0 comments on commit 5fdbbec

Please sign in to comment.