fix: use openapi_patching from v1

This commit is contained in:
shenlong-tanwen
2024-09-25 22:26:02 +05:30
parent 9f29bce308
commit a09710ec7b
7 changed files with 71 additions and 120 deletions
@@ -127,7 +127,14 @@ class LoginService with LogMixin {
/// Set token to interceptor
await di<ImmichApiClient>().init(accessToken: accessToken);
final user = await di<UserService>().getMyUser();
final user = await di<UserService>().getMyUser().timeout(
const Duration(seconds: 10),
// ignore: function-always-returns-null
onTimeout: () {
log.w("Timedout while fetching user details using saved credentials");
return null;
},
);
if (user == null) {
return false;
}