public void LoginUser(string email, string password, bool rememberMe)
 {
     _loginModel.Login(email, password, rememberMe);
     _loginView.Loginpath      = _loginModel.Loginpath;
     _loginView.FailureMassage = _loginModel.FailureMessage;
     _loginView.ErrorMessage   = _loginModel.ErrorMessage;
 }
예제 #2
0
        public ActionResult Login(ViewModel.loginVM model)
        {
            ResponseModel <ViewModel.loginResponseVM> result = new ResponseModel <ViewModel.loginResponseVM>();

            try
            {
                var token = _userRepo.Login(model.NationalityCode, model.Password);
                // if (!token.HasValue)
                //     {
                //         return NotFound();
                //     }
                result.Data = token;
                return(Ok(result));
            }
            catch (System.Exception ex)
            {
                _logger.LogError("error in register", ex);
                return(StatusCode(500));
            }
        }