mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-29 05:17:04 +02:00
Use config.ServiceConfig across API
This commit is contained in:
parent
091b3c2f49
commit
9c363cc06d
27 changed files with 137 additions and 99 deletions
|
@ -22,8 +22,8 @@ import (
|
|||
"sort"
|
||||
"time"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
"go.uploadedlobster.com/scotty/internal/auth"
|
||||
"go.uploadedlobster.com/scotty/internal/config"
|
||||
"go.uploadedlobster.com/scotty/internal/models"
|
||||
"golang.org/x/oauth2"
|
||||
)
|
||||
|
@ -48,7 +48,7 @@ func (b *DeezerApiBackend) Options() *[]models.BackendOption {
|
|||
}}
|
||||
}
|
||||
|
||||
func (b *DeezerApiBackend) FromConfig(config *viper.Viper) models.Backend {
|
||||
func (b *DeezerApiBackend) FromConfig(config *config.ServiceConfig) models.Backend {
|
||||
b.clientId = config.GetString("client-id")
|
||||
b.clientSecret = config.GetString("client-secret")
|
||||
return b
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue