chore: follow up on auth refactoring (#14367)

* chore: follow up on auth refactoring

* remove async
This commit is contained in:
Alex 2024-11-26 13:36:12 -06:00 committed by GitHub
parent 21f14be949
commit b4c96a09fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 7 deletions

View File

@ -17,12 +17,14 @@ class AuthRepository extends DatabaseRepository implements IAuthRepository {
@override @override
Future<void> clearLocalData() { Future<void> clearLocalData() {
return db.writeTxn(() async { return db.writeTxn(() {
await db.assets.clear(); return Future.wait([
await db.exifInfos.clear(); db.assets.clear(),
await db.albums.clear(); db.exifInfos.clear(),
await db.eTags.clear(); db.albums.clear(),
await db.users.clear(); db.eTags.clear(),
db.users.clear(),
]);
}); });
} }
} }

View File

@ -63,7 +63,9 @@ class AuthService {
} catch (error, stackTrace) { } catch (error, stackTrace) {
_log.severe("Error logging out", error, stackTrace); _log.severe("Error logging out", error, stackTrace);
} finally { } finally {
await clearLocalData(); await clearLocalData().catchError((error, stackTrace) {
_log.severe("Error clearing local data", error, stackTrace);
});
} }
} }