QOL: Patient Manager overhaul pt1

This commit is contained in:
2025-11-13 14:03:16 +02:00
parent 6542f1c399
commit 4fe544b35f
9 changed files with 399 additions and 987 deletions

View File

@@ -99,7 +99,26 @@ class MihUserServices {
}
}
Future<AppUser?> getUserDetails(
Future<AppUser?> getMIHUserDetails(
String app_id,
BuildContext context,
) async {
var response = await http.get(
Uri.parse("${AppEnviroment.baseApiUrl}/user/$app_id"),
headers: <String, String>{
"Content-Type": "application/json; charset=UTF-8"
},
);
if (response.statusCode == 200) {
String body = response.body;
var jsonBody = jsonDecode(body);
return AppUser.fromJson(jsonBody);
} else {
return null;
}
}
Future<AppUser?> getMyUserDetails(
BuildContext context,
) async {
String app_id = await SuperTokens.getUserId();
@@ -109,7 +128,6 @@ class MihUserServices {
"Content-Type": "application/json; charset=UTF-8"
},
);
if (response.statusCode == 200) {
String body = response.body;
var jsonBody = jsonDecode(body);