Beispiel #1
0
        public async Task <ActionResult <User> > GetUser(string userName)
        {
            try
            {
                User user = await _userLogin.ValidateUser(userName);

                if (user != null)
                {
                    return(Ok(user));
                }

                return(NotFound());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(StatusCode(500, e.Message));
            }
        }
 public UserLoginVM Get(string userName, string password)
 {
     return(userLogin.ValidateUser(userName, password));
 }