TF-34 Add domain layer login for fix bug mock data user

This commit is contained in:
dab246
2021-08-25 13:11:24 +07:00
committed by Dat H. Pham
parent b50cec44c2
commit b3e1534de3
5 changed files with 14 additions and 6 deletions
@@ -17,7 +17,8 @@ class AuthenticationInteractor {
await Future.wait([
credentialRepository.saveBaseUrl(baseUrl),
credentialRepository.saveUserName(userName),
credentialRepository.savePassword(password)
credentialRepository.savePassword(password),
credentialRepository.saveUserProfile(user),
]);
return Right(AuthenticationUserViewState(user));
} catch (e) {
@@ -15,7 +15,8 @@ class DeleteCredentialInteractor {
await Future.wait([
credentialRepository.removeBaseUrl(),
credentialRepository.removeUserName(),
credentialRepository.removePassword()
credentialRepository.removePassword(),
credentialRepository.removeUserProfile(),
]);
return Right(DeleteCredentialSuccess());
} catch (exception) {