Renamed Backend.FromConfig to Backend.InitConfig and added error handling

This commit is contained in:
Philipp Wolfer 2025-04-29 10:03:28 +02:00
parent aad542850a
commit 0f4b04c641
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
21 changed files with 60 additions and 48 deletions

View file

@ -49,10 +49,10 @@ func (b *DeezerApiBackend) Options() []models.BackendOption {
}}
}
func (b *DeezerApiBackend) FromConfig(config *config.ServiceConfig) models.Backend {
func (b *DeezerApiBackend) InitConfig(config *config.ServiceConfig) error {
b.clientId = config.GetString("client-id")
b.clientSecret = config.GetString("client-secret")
return b
return nil
}
func (b *DeezerApiBackend) OAuth2Strategy(redirectUrl *url.URL) auth.OAuth2Strategy {