mirror of
https://github.com/immich-app/immich.git
synced 2024-12-13 11:54:52 +02:00
chore: follow up on auth refactoring (#14367)
* chore: follow up on auth refactoring * remove async
This commit is contained in:
parent
21f14be949
commit
b4c96a09fb
@ -17,12 +17,14 @@ class AuthRepository extends DatabaseRepository implements IAuthRepository {
|
||||
|
||||
@override
|
||||
Future<void> clearLocalData() {
|
||||
return db.writeTxn(() async {
|
||||
await db.assets.clear();
|
||||
await db.exifInfos.clear();
|
||||
await db.albums.clear();
|
||||
await db.eTags.clear();
|
||||
await db.users.clear();
|
||||
return db.writeTxn(() {
|
||||
return Future.wait([
|
||||
db.assets.clear(),
|
||||
db.exifInfos.clear(),
|
||||
db.albums.clear(),
|
||||
db.eTags.clear(),
|
||||
db.users.clear(),
|
||||
]);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -63,7 +63,9 @@ class AuthService {
|
||||
} catch (error, stackTrace) {
|
||||
_log.severe("Error logging out", error, stackTrace);
|
||||
} finally {
|
||||
await clearLocalData();
|
||||
await clearLocalData().catchError((error, stackTrace) {
|
||||
_log.severe("Error clearing local data", error, stackTrace);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user