read token from config
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
@@ -87,7 +86,7 @@ func Setup(app *aero.Application, c config.ConfigInterface, t *torrent.TorrentMa
|
||||
}
|
||||
|
||||
unrestrictFn := func() (*realdebrid.UnrestrictResponse, error) {
|
||||
return realdebrid.UnrestrictLink(os.Getenv("RD_TOKEN"), link)
|
||||
return realdebrid.UnrestrictLink(c.GetToken(), link)
|
||||
}
|
||||
resp := realdebrid.RetryUntilOk(unrestrictFn)
|
||||
if resp == nil {
|
||||
|
||||
Reference in New Issue
Block a user