chore: some missing async/awaits.

This commit is contained in:
Aliaksei Tratseuski 2024-05-15 19:47:41 +04:00
parent fcf120bc0c
commit 5e27b369ca
2 changed files with 7 additions and 5 deletions

View file

@ -13,9 +13,11 @@ final GetIt getIt = GetIt.instance;
Future<void> getItSetup() async { Future<void> getItSetup() async {
getIt.registerSingleton<NavigationService>(NavigationService()); getIt.registerSingleton<NavigationService>(NavigationService());
getIt.registerSingleton<ConsoleModel>(ConsoleModel()); getIt.registerSingleton<ConsoleModel>(ConsoleModel());
getIt.registerSingleton<ApiConfigModel>(ApiConfigModel()..init());
final apiConfigModel = ApiConfigModel();
await apiConfigModel.init();
getIt.registerSingleton<ApiConfigModel>(apiConfigModel);
getIt.registerSingleton<ApiConnectionRepository>( getIt.registerSingleton<ApiConnectionRepository>(
ApiConnectionRepository()..init(), ApiConnectionRepository()..init(),

View file

@ -501,7 +501,7 @@ class ServerInstallationRepository {
Future<void> deleteServerProviderKey() async { Future<void> deleteServerProviderKey() async {
await box.delete(BNames.hetznerKey); await box.delete(BNames.hetznerKey);
getIt<ApiConfigModel>().init(); await getIt<ApiConfigModel>().init();
} }
Future<void> saveBackblazeKey( Future<void> saveBackblazeKey(
@ -512,7 +512,7 @@ class ServerInstallationRepository {
Future<void> deleteBackblazeKey() async { Future<void> deleteBackblazeKey() async {
await box.delete(BNames.backblazeCredential); await box.delete(BNames.backblazeCredential);
getIt<ApiConfigModel>().init(); await getIt<ApiConfigModel>().init();
} }
Future<void> setDnsApiToken(final String key) async { Future<void> setDnsApiToken(final String key) async {
@ -521,7 +521,7 @@ class ServerInstallationRepository {
Future<void> deleteDnsProviderKey() async { Future<void> deleteDnsProviderKey() async {
await box.delete(BNames.cloudFlareKey); await box.delete(BNames.cloudFlareKey);
getIt<ApiConfigModel>().init(); await getIt<ApiConfigModel>().init();
} }
Future<void> saveDomain(final ServerDomain serverDomain) async { Future<void> saveDomain(final ServerDomain serverDomain) async {