diff --git a/covas_mobile/android/build.gradle b/covas_mobile/android/build.gradle index 83ae220..3cdaac9 100644 --- a/covas_mobile/android/build.gradle +++ b/covas_mobile/android/build.gradle @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/covas_mobile/lib/MyHomePage.dart b/covas_mobile/lib/MyHomePage.dart index eb641e0..95879f8 100644 --- a/covas_mobile/lib/MyHomePage.dart +++ b/covas_mobile/lib/MyHomePage.dart @@ -66,17 +66,17 @@ class _MyHomePageState extends State with ShowErrorDialog { String former = ""; if (accessToken.isNotEmpty) { - var urlGet = Uri.parse("http://${globals.api}/users"); + var urlGet = Uri.parse("http://${globals.api}/events"); var responseGet = await http.get(urlGet, headers: {HttpHeaders.cookieHeader: 'access_token=${accessToken}'}); stderr.writeln('Response Get status: ${responseGet.statusCode}'); if (responseGet.statusCode == 200) { stderr.writeln('Username : ${responseGet.body}'); - var json = jsonDecode(responseGet.body); + var json = jsonDecode(utf8.decode(responseGet.bodyBytes)); for (var user in json) { - stderr.writeln('email : ${user['email']}'); - former = "$former\n ${user['email']}"; + stderr.writeln('name : ${user['name']}'); + former = "$former\n ${user['name']} : ${user["place"]}"; } } else { var text = "";