6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit ec82fe88
Changed files
comwell_key_app/lib/check_in/check_in_repository.dart | 3 ++- comwell_key_app/lib/services/api.dart | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-)
Diff
diff --git a/comwell_key_app/lib/check_in/check_in_repository.dart b/comwell_key_app/lib/check_in/check_in_repository.dart
index 8d53da27..237a11d3 100644
--- a/comwell_key_app/lib/check_in/check_in_repository.dart
+++ b/comwell_key_app/lib/check_in/check_in_repository.dart
@@ -19,7 +19,8 @@ class CheckInRepository {
final profileRepository = locator<ProfileRepository>();
Future<void> checkIn(String confirmationId) async {
- await api.checkIn(confirmationId);
+ final response = await api.checkIn(confirmationId);
+ print("response in checkInRepository: $response");
}
Future<Booking> getBookingDetails(String bookingId) async {
diff --git a/comwell_key_app/lib/services/api.dart b/comwell_key_app/lib/services/api.dart
index 38984e99..b6bd15bf 100644
--- a/comwell_key_app/lib/services/api.dart
+++ b/comwell_key_app/lib/services/api.dart
@@ -158,9 +158,13 @@ class Api {
}
Future<dynamic> checkIn(String confirmationId) async {
- final response = await dio.post<void>(ApiEndpoints.checkIn,
- data: {"confirmationId": confirmationId});
- print("response in api: $response");
+ print("checking in with confirmationId: $confirmationId");
+ final body = {
+ "confirmationId": confirmationId,
+ };
+ final json = jsonEncode(body);
+ final response = await dio.post<dynamic>(ApiEndpoints.checkIn,
+ data: json);
return response;
}