NEW: Add user and business count to about MIH

This commit is contained in:
2025-09-23 11:43:27 +02:00
parent 5548a23f69
commit ffcee3b7a7
5 changed files with 221 additions and 3 deletions

View File

@@ -33,6 +33,21 @@ class MihUserServices {
}
}
Future<int> fetchUserCount() async {
var response = await http.get(
Uri.parse("${AppEnviroment.baseApiUrl}/users/count/"),
headers: <String, String>{
"Content-Type": "application/json; charset=UTF-8"
},
);
if (response.statusCode == 200) {
var jsonBody = jsonDecode(response.body);
return jsonBody['count'];
} else {
return 0;
}
}
Future<void> createUser(
String email,
String app_id,