mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-22 03:37:43 +00:00
remove live activity record when oauth revoked
This commit is contained in:
parent
f50d9f075e
commit
cd8b0b0dca
1 changed files with 6 additions and 0 deletions
|
@ -187,6 +187,9 @@ func (lac *liveActivitiesConsumer) Consume(delivery rmq.Delivery) {
|
|||
zap.String("reddit#access_token", rac.ObfuscatedAccessToken()),
|
||||
zap.String("reddit#refresh_token", rac.ObfuscatedRefreshToken()),
|
||||
)
|
||||
if err == reddit.ErrOauthRevoked {
|
||||
_ = lac.liveActivityRepo.Delete(lac, at)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -211,6 +214,9 @@ func (lac *liveActivitiesConsumer) Consume(delivery rmq.Delivery) {
|
|||
zap.String("reddit#access_token", rac.ObfuscatedAccessToken()),
|
||||
zap.String("reddit#refresh_token", rac.ObfuscatedRefreshToken()),
|
||||
)
|
||||
if err == reddit.ErrOauthRevoked {
|
||||
_ = lac.liveActivityRepo.Delete(lac, at)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue