[core] Fix: Read refresh token from database

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2022-09-10 20:36:55 +02:00
parent a7533cbd8b
commit 5922c29e93
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D

View file

@ -48,7 +48,7 @@ func (s Service) GetBotTwitchClient(cfg ClientConfig) (*twitch.Client, error) {
return nil, errors.Wrap(err, "getting bot access token from database")
}
if err = s.db.ReadEncryptedCoreMeta(coreMetaKeyBotToken, &botAccessToken); err != nil && !errors.Is(err, database.ErrCoreMetaNotFound) {
if err = s.db.ReadEncryptedCoreMeta(coreMetaKeyBotRefreshToken, &botRefreshToken); err != nil && !errors.Is(err, database.ErrCoreMetaNotFound) {
return nil, errors.Wrap(err, "getting bot refresh token from database")
}