Skip to content

Commit

Permalink
fix: init aria2 client
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Jun 29, 2022
1 parent 58d153e commit 786e44d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/aria2/aria2.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ func InitAria2Client(uri string, secret string, timeout int) error {
if err != nil {
return errors.Wrap(err, "failed to init aria2 client")
}
client = c
version, err := client.GetVersion()
version, err := c.GetVersion()
if err != nil {
return errors.Wrapf(err, "failed get aria2 version")
}
client = c
log.Infof("using aria2 version: %s", version.Version)
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions server/controllers/aria2.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
)

type SetAria2Req struct {
Uri string `json:"uri"`
Secret string `json:"secret"`
Uri string `json:"uri" form:"uri"`
Secret string `json:"secret" form:"secret"`
}

func SetAria2(c *gin.Context) {
Expand Down

0 comments on commit 786e44d

Please sign in to comment.