chore: change qBittorrent setting [skip ci]
This commit is contained in:
@ -19,10 +19,14 @@ func SetQbittorrent(c *gin.Context) {
|
||||
common.ErrorResp(c, err, 400)
|
||||
return
|
||||
}
|
||||
items := []model.SettingItem{
|
||||
{Key: conf.QbittorrentUrl, Value: req.Url, Type: conf.TypeString, Group: model.QBITTORRENT, Flag: model.PRIVATE},
|
||||
item := &model.SettingItem{
|
||||
Key: conf.QbittorrentUrl,
|
||||
Value: req.Url,
|
||||
Type: conf.TypeString,
|
||||
Group: model.SINGLE,
|
||||
Flag: model.PRIVATE,
|
||||
}
|
||||
if err := op.SaveSettingItems(items); err != nil {
|
||||
if err := op.SaveSettingItem(item); err != nil {
|
||||
common.ErrorResp(c, err, 500)
|
||||
return
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ func admin(g *gin.RouterGroup) {
|
||||
setting.POST("/delete", handles.DeleteSetting)
|
||||
setting.POST("/reset_token", handles.ResetToken)
|
||||
setting.POST("/set_aria2", handles.SetAria2)
|
||||
setting.POST("/set_qbittorrent", handles.SetQbittorrent)
|
||||
setting.POST("/set_qbit", handles.SetQbittorrent)
|
||||
|
||||
task := g.Group("/task")
|
||||
handles.SetupTaskRoute(task)
|
||||
|
Reference in New Issue
Block a user