From 2e86a02343091c32079566a52299a0dfb94d76fb Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 22 May 2022 09:00:09 +1000 Subject: [PATCH] more debug --- lib/user_profile.dart | 4 ++++ test/api_test.dart | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/user_profile.dart b/lib/user_profile.dart index 507d9f07..05c98a82 100644 --- a/lib/user_profile.dart +++ b/lib/user_profile.dart @@ -151,8 +151,12 @@ class UserProfileDBManager { final profiles = await store.find(await _db); + print("getSelectedProfile() - ${profiles.length} profiles available - selected = ${selected}"); + for (int idx = 0; idx < profiles.length; idx++) { + print("- Checking ${idx} - key = ${profiles[idx].key} - ${profiles[idx].value.toString()}"); + if (profiles[idx].key is int && profiles[idx].key == selected) { return UserProfile.fromJson( profiles[idx].key as int, diff --git a/test/api_test.dart b/test/api_test.dart index 83ff2e37..4553d338 100644 --- a/test/api_test.dart +++ b/test/api_test.dart @@ -76,7 +76,7 @@ void main() { // TODO: Test the the right 'error message' is returned // TODO: The request above should throw a 'SockeException' - + // Test incorrect login details profile.server = "http://localhost:12345"; profile.username = "invalidusername";