From 2b07d16f00c12ad10d5228327ad79f6848c10596 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Sun, 31 Jan 2021 12:45:12 +0200 Subject: [PATCH] fix : DA-303 --- lib/client/base_app_client.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index e38db07c..604e6f30 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -70,7 +70,7 @@ class BaseAppClient { body['Channel'] = CHANNEL; body['SessionID'] = SESSION_ID; body['IsLoginForDoctorApp'] = IS_LOGIN_FOR_DOCTOR_APP; - body['PatientOutSA'] = 0; // PATIENT_OUT_SA; + body['PatientOutSA'] = body['PatientOutSA']??0; // PATIENT_OUT_SA; if (body['VidaAuthTokenID'] == null) { body['VidaAuthTokenID'] = await sharedPref.getString(VIDA_AUTH_TOKEN_ID); @@ -96,9 +96,9 @@ class BaseAppClient { } else { var parsed = json.decode(response.body.toString()); if (!parsed['IsAuthenticated']) { - onFailure(getError(parsed), statusCode); - //await helpers.logout(); - //helpers.showErrorToast('Your session expired Please login agian'); + // onFailure(getError(parsed), statusCode); + await helpers.logout(); + helpers.showErrorToast('Your session expired Please login agian'); } else if (parsed['MessageStatus'] == 1) { if (!parsed['IsAuthenticated']) onFailure(getError(parsed), statusCode);