mirror of
https://github.com/simon-ding/polaris.git
synced 2026-05-28 13:37:43 +08:00
fix: save setting
This commit is contained in:
@@ -196,6 +196,7 @@ type downloadClientIn struct {
|
|||||||
Password string `json:"password"`
|
Password string `json:"password"`
|
||||||
Implementation string `json:"implementation" binding:"required"`
|
Implementation string `json:"implementation" binding:"required"`
|
||||||
Priority int `json:"priority"`
|
Priority int `json:"priority"`
|
||||||
|
UseNatTraversal bool `json:"use_nat_traversal"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) AddDownloadClient(c *gin.Context) (interface{}, error) {
|
func (s *Server) AddDownloadClient(c *gin.Context) (interface{}, error) {
|
||||||
@@ -231,6 +232,7 @@ func (s *Server) AddDownloadClient(c *gin.Context) (interface{}, error) {
|
|||||||
URL: in.URL,
|
URL: in.URL,
|
||||||
User: in.User,
|
User: in.User,
|
||||||
Password: in.Password,
|
Password: in.Password,
|
||||||
|
UseNatTraversal: in.UseNatTraversal,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return nil, errors.Wrap(err, "save downloader")
|
return nil, errors.Wrap(err, "save downloader")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user