|
|
|
@ -70,7 +70,7 @@ class BaseAppClient {
|
|
|
|
body['Channel'] = CHANNEL;
|
|
|
|
body['Channel'] = CHANNEL;
|
|
|
|
body['SessionID'] = SESSION_ID;
|
|
|
|
body['SessionID'] = SESSION_ID;
|
|
|
|
body['IsLoginForDoctorApp'] = IS_LOGIN_FOR_DOCTOR_APP;
|
|
|
|
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) {
|
|
|
|
if (body['VidaAuthTokenID'] == null) {
|
|
|
|
body['VidaAuthTokenID'] =
|
|
|
|
body['VidaAuthTokenID'] =
|
|
|
|
await sharedPref.getString(VIDA_AUTH_TOKEN_ID);
|
|
|
|
await sharedPref.getString(VIDA_AUTH_TOKEN_ID);
|
|
|
|
@ -96,9 +96,9 @@ class BaseAppClient {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
var parsed = json.decode(response.body.toString());
|
|
|
|
var parsed = json.decode(response.body.toString());
|
|
|
|
if (!parsed['IsAuthenticated']) {
|
|
|
|
if (!parsed['IsAuthenticated']) {
|
|
|
|
onFailure(getError(parsed), statusCode);
|
|
|
|
// onFailure(getError(parsed), statusCode);
|
|
|
|
//await helpers.logout();
|
|
|
|
await helpers.logout();
|
|
|
|
//helpers.showErrorToast('Your session expired Please login agian');
|
|
|
|
helpers.showErrorToast('Your session expired Please login agian');
|
|
|
|
} else if (parsed['MessageStatus'] == 1) {
|
|
|
|
} else if (parsed['MessageStatus'] == 1) {
|
|
|
|
if (!parsed['IsAuthenticated'])
|
|
|
|
if (!parsed['IsAuthenticated'])
|
|
|
|
onFailure(getError(parsed), statusCode);
|
|
|
|
onFailure(getError(parsed), statusCode);
|
|
|
|
|