From dab3735b113479042403599f1aa6542a2dab21a6 Mon Sep 17 00:00:00 2001 From: yaso-meth Date: Thu, 25 Jul 2024 14:52:54 +0200 Subject: [PATCH] personal profile update --- .../patient_manager/lib/components/profileUserUpdate.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Frontend/patient_manager/lib/components/profileUserUpdate.dart b/Frontend/patient_manager/lib/components/profileUserUpdate.dart index 88ed75f9..d453ccaa 100644 --- a/Frontend/patient_manager/lib/components/profileUserUpdate.dart +++ b/Frontend/patient_manager/lib/components/profileUserUpdate.dart @@ -46,7 +46,7 @@ class _ProfileUserUpdateState extends State { //print(futureDocOfficeId.toString()); //print("Here3"); var response = await http.put( - Uri.parse("${AppEnviroment.baseApiUrl}/"), + Uri.parse("${AppEnviroment.baseApiUrl}/user/update/"), headers: { "Content-Type": "application/json; charset=UTF-8" }, @@ -60,8 +60,7 @@ class _ProfileUserUpdateState extends State { //print("Here4"); //print(response.statusCode); if (response.statusCode == 200) { - Navigator.of(context) - .pushNamed('/profile', arguments: widget.signedInUser); + Navigator.of(context).pushNamed('/', arguments: widget.signedInUser); String message = "${widget.signedInUser.email}'s information has been updated successfully!"; successPopUp(message); @@ -143,6 +142,7 @@ class _ProfileUserUpdateState extends State { textColor: MzanziInnovationHub.of(context)!.theme.primaryColor(), onTap: () { if (isFieldsFilled()) { + updateUserApiCall(); } else { showDialog( context: context,