mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Handles Patreon de-authentication gracefully
This commit is contained in:
@@ -143,6 +143,11 @@ extension PatreonAPI
|
||||
self.send(request, authorizationType: .user) { (result: Result<AccountResponse, Swift.Error>) in
|
||||
switch result
|
||||
{
|
||||
case .failure(Error.notAuthenticated):
|
||||
self.signOut() { (result) in
|
||||
completion(.failure(Error.notAuthenticated))
|
||||
}
|
||||
|
||||
case .failure(let error): completion(.failure(error))
|
||||
case .success(let response):
|
||||
DatabaseManager.shared.persistentContainer.performBackgroundTask { (context) in
|
||||
|
||||
Reference in New Issue
Block a user