[pve-devel] [PATCH proxmox_dart_api_client 1/1] fix typos
Michael Köppl
m.koeppl at proxmox.com
Fri May 2 14:10:45 CEST 2025
In addition to user-facing errors, a few internal variable names are
also fixed.
Signed-off-by: Michael Köppl <m.koeppl at proxmox.com>
---
lib/src/client.dart | 2 +-
lib/src/handle_ticket_response.dart | 7 ++++---
lib/src/models/pve_cluster_resources_model.dart | 4 ++--
lib/src/models/pve_nodes_lxc_status_model.dart | 2 +-
lib/src/models/pve_nodes_qemu_status_model.dart | 2 +-
5 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/lib/src/client.dart b/lib/src/client.dart
index f597c28..889d81c 100644
--- a/lib/src/client.dart
+++ b/lib/src/client.dart
@@ -94,7 +94,7 @@ class ProxmoxApiClient extends http.BaseClient {
Future<ProxmoxApiClient> finishTfaChallenge(String kind, String code) async {
if (credentials.tfa == null) {
- throw StateError('No tfa challange expected');
+ throw StateError('No tfa challenge expected');
}
credentials = await credentials.tfaChallenge(kind, code,
diff --git a/lib/src/handle_ticket_response.dart b/lib/src/handle_ticket_response.dart
index 7d4c650..ba2128f 100644
--- a/lib/src/handle_ticket_response.dart
+++ b/lib/src/handle_ticket_response.dart
@@ -1,11 +1,12 @@
import 'dart:convert';
+
import 'package:http/http.dart' as http;
import 'package:proxmox_dart_api_client/src/credentials.dart';
import 'package:proxmox_dart_api_client/src/extentions.dart';
import 'package:proxmox_dart_api_client/src/tfa_challenge.dart';
Credentials handleAccessTicketResponse(
- http.Response response, Credentials unauthenicatedCredentials) {
+ http.Response response, Credentials unauthenticatedCredentials) {
response.validate(false);
final bodyJson = jsonDecode(response.body)['data'];
@@ -29,8 +30,8 @@ Credentials handleAccessTicketResponse(
}
return Credentials(
- unauthenicatedCredentials.apiBaseUrl,
- unauthenicatedCredentials.username,
+ unauthenticatedCredentials.apiBaseUrl,
+ unauthenticatedCredentials.username,
ticket: ticket,
csrfToken: csrfToken,
expiration: time,
diff --git a/lib/src/models/pve_cluster_resources_model.dart b/lib/src/models/pve_cluster_resources_model.dart
index 1f69213..16e18df 100644
--- a/lib/src/models/pve_cluster_resources_model.dart
+++ b/lib/src/models/pve_cluster_resources_model.dart
@@ -69,7 +69,7 @@ abstract class PveClusterResourcesModel
return PveResourceStatusType.stopped;
}
- return PveResourceStatusType.unkown;
+ return PveResourceStatusType.unknown;
}
}
@@ -109,7 +109,7 @@ class PveResourceStatusType extends EnumClass {
static const PveResourceStatusType paused = _$paused;
static const PveResourceStatusType suspending = _$suspending;
static const PveResourceStatusType suspended = _$suspended;
- static const PveResourceStatusType unkown = _$unkown;
+ static const PveResourceStatusType unknown = _$unknown;
const PveResourceStatusType._(super.name);
diff --git a/lib/src/models/pve_nodes_lxc_status_model.dart b/lib/src/models/pve_nodes_lxc_status_model.dart
index c82574e..7f71bf9 100644
--- a/lib/src/models/pve_nodes_lxc_status_model.dart
+++ b/lib/src/models/pve_nodes_lxc_status_model.dart
@@ -49,7 +49,7 @@ abstract class PveNodesLxcStatusModel
}
return PveResourceStatusType.stopped;
}
- return PveResourceStatusType.unkown;
+ return PveResourceStatusType.unknown;
}
}
diff --git a/lib/src/models/pve_nodes_qemu_status_model.dart b/lib/src/models/pve_nodes_qemu_status_model.dart
index 8b997c1..ae82802 100644
--- a/lib/src/models/pve_nodes_qemu_status_model.dart
+++ b/lib/src/models/pve_nodes_qemu_status_model.dart
@@ -59,6 +59,6 @@ abstract class PveQemuStatusModel
}
return PveResourceStatusType.stopped;
}
- return PveResourceStatusType.unkown;
+ return PveResourceStatusType.unknown;
}
}
--
2.39.5
More information about the pve-devel
mailing list