From 5e27b369ca37c8d658f0e9688f8ba48e117d9524 Mon Sep 17 00:00:00 2001 From: Aliaksei Tratseuski Date: Wed, 15 May 2024 19:47:41 +0400 Subject: [PATCH] chore: some missing async/awaits. --- lib/config/get_it_config.dart | 6 ++++-- .../server_installation/server_installation_repository.dart | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/config/get_it_config.dart b/lib/config/get_it_config.dart index aa3db90b..5f6d55cb 100644 --- a/lib/config/get_it_config.dart +++ b/lib/config/get_it_config.dart @@ -13,9 +13,11 @@ final GetIt getIt = GetIt.instance; Future getItSetup() async { getIt.registerSingleton(NavigationService()); - getIt.registerSingleton(ConsoleModel()); - getIt.registerSingleton(ApiConfigModel()..init()); + + final apiConfigModel = ApiConfigModel(); + await apiConfigModel.init(); + getIt.registerSingleton(apiConfigModel); getIt.registerSingleton( ApiConnectionRepository()..init(), diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index 75daa0ab..b15cebae 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -501,7 +501,7 @@ class ServerInstallationRepository { Future deleteServerProviderKey() async { await box.delete(BNames.hetznerKey); - getIt().init(); + await getIt().init(); } Future saveBackblazeKey( @@ -512,7 +512,7 @@ class ServerInstallationRepository { Future deleteBackblazeKey() async { await box.delete(BNames.backblazeCredential); - getIt().init(); + await getIt().init(); } Future setDnsApiToken(final String key) async { @@ -521,7 +521,7 @@ class ServerInstallationRepository { Future deleteDnsProviderKey() async { await box.delete(BNames.cloudFlareKey); - getIt().init(); + await getIt().init(); } Future saveDomain(final ServerDomain serverDomain) async {