Fixed oauth token refresh for source

This commit is contained in:
Philipp Wolfer 2023-11-22 08:21:43 +01:00
parent 117014a977
commit cf3747bde2
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
2 changed files with 2 additions and 9 deletions

View file

@ -54,7 +54,7 @@ var listensCmd = &cobra.Command{
auth, err := backends.Authenticate(exportBackend, token, viper.GetViper())
cobra.CheckErr(err)
if auth {
db.SetOAuth2Token(sourceName, token)
defer db.SetOAuth2Token(sourceName, token)
}
token, err = db.GetOAuth2Token(targetName)