Skip to content

Commit

Permalink
fix: ignore logout api error (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
2paperstar authored Jul 23, 2024
1 parent 4259b2a commit e6f0f49
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class RemoteAuthRepository implements AuthRepository {
Future<void> logout() async {
final accessToken = await _tokenRepository.token.first;
if (accessToken == null) return;
await _api.logout(accessToken);
await _api.logout(accessToken).catchError((_) => null);
await _tokenRepository.deleteToken();
_userController.add(null);
}
Expand Down
1 change: 0 additions & 1 deletion lib/app/modules/auth/presentation/bloc/auth_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class AuthBloc extends Bloc<AuthEvent, AuthState> {
emit(const _Loading());
await _oAuthRepository.setRecentLogout();
await _authRepository.logout();
_authRepository.logout();
emit(const _Guest());
});
on<_UpdatePushToken>((event, emit) async {
Expand Down

0 comments on commit e6f0f49

Please sign in to comment.