Fix AllDebrid symlink bug

This commit is contained in:
Mukhtar Akere
2025-01-19 08:56:52 +01:00
parent a986c4b5d0
commit cfb0051b04
6 changed files with 36 additions and 24 deletions

View File

@@ -248,5 +248,11 @@ func (u *uiHandler) handleDeleteTorrent(w http.ResponseWriter, r *http.Request)
func (u *uiHandler) handleGetConfig(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
common.JSONResponse(w, common.CONFIG, http.StatusOK)
config := common.CONFIG
arrCfgs := make([]common.ArrConfig, 0)
for _, a := range u.qbit.Arrs.GetAll() {
arrCfgs = append(arrCfgs, common.ArrConfig{Host: a.Host, Name: a.Name, Token: a.Token})
}
config.Arrs = arrCfgs
common.JSONResponse(w, config, http.StatusOK)
}