From 18d58e70378f7d1e972756e7d23ac3d47aba6de5 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Mon, 28 Dec 2020 11:07:52 +0200 Subject: [PATCH] remove is Auth for test target --- lib/client/base_app_client.dart | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 2fda496a..597de3b4 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -80,12 +80,12 @@ class BaseAppClient { onFailure('Error While Fetching data', statusCode); } else { var parsed = json.decode(response.body.toString()); - if (!parsed['IsAuthenticated']) { - // TODO: return it back when IsAuthenticated work fine in all service - // await helpers.logout(); - - helpers.showErrorToast('Your session expired Please login agian'); - } else + // if (!parsed['IsAuthenticated']) { + // // TODO: return it back when IsAuthenticated work fine in all service + // // await helpers.logout(); + // + // helpers.showErrorToast('Your session expired Please login agian'); + // } else if (parsed['MessageStatus'] == 1) { onSuccess(parsed, statusCode); } else { @@ -93,9 +93,8 @@ class BaseAppClient { parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage']; if (parsed["ValidationErrors"] != null) { - // TODO : return it back after check the StatusMessage it not null - // error = - // parsed["ValidationErrors"]["StatusMessage"].toString() + "\n"; + error = + parsed["ValidationErrors"]["StatusMessage"].toString() + "\n"; if (parsed["ValidationErrors"]["ValidationErrors"] != null && parsed["ValidationErrors"]["ValidationErrors"].length != 0) {