diff --git a/game/lib/api/game_api.dart b/game/lib/api/game_api.dart index 7cf170e4..3a6538cb 100644 --- a/game/lib/api/game_api.dart +++ b/game/lib/api/game_api.dart @@ -252,22 +252,16 @@ class ApiClient extends ChangeNotifier { queryParameters: {'idToken': idToken}, ); final response = await http.get(uri); - print('Response status: ${response.statusCode}'); - print('Response body: ${response.body}'); if (response.statusCode == 200) { final responseData = jsonDecode(response.body); if (responseData['exists'] == true) { - print('User exists in the database.'); return true; - } else { - print('User does not exist.'); - return false; } - } else { - print('Failed to check user. Status code: ${response.statusCode}'); return false; } + print('Failed to check user. Status code: ${response.statusCode}'); + return false; } catch (e) { print('Error occurred while checking user: $e'); return false; diff --git a/game/lib/splash_page/splash_page.dart b/game/lib/splash_page/splash_page.dart index c9fe37fb..eaca812b 100644 --- a/game/lib/splash_page/splash_page.dart +++ b/game/lib/splash_page/splash_page.dart @@ -86,18 +86,14 @@ class SplashPageWidget extends StatelessWidget { await apiClient.checkUserExists(idToken ?? ""); if (userExists) { // User exists, proceed with the login process - print("User exists, connecting..."); final gRelogResult = await client.connectGoogleNoRegister(account); if (gRelogResult != null) { - print("Login successful, navigating to home..."); return; } } else { // User does not exist, navigate to registration page - print( - "User does not exist, navigating to registration..."); Navigator.of(context).push( MaterialPageRoute( builder: (context) => RegisterPageWidget(