Skip to content

Commit

Permalink
Fixed the wrong uri call for checking user existence
Browse files Browse the repository at this point in the history
  • Loading branch information
Shengle-Dai committed Nov 18, 2024
1 parent 1b872aa commit f3c2d77
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion game/lib/api/game_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,13 @@ class ApiClient extends ChangeNotifier {

Future<bool> checkUserExists(String idToken) async {
try {
final response = await http.get(_googleLoginUrl);
final uri = _googleLoginUrl.replace(
path: '${_googleLoginUrl.path}/check-user',
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);
Expand Down

0 comments on commit f3c2d77

Please sign in to comment.