Beispiel #1
0
        public IActionResult Authenticate([FromBody] AuthenticateUserModel model)
        {
            var User = _DBService.GetUser(model.Email, model.Password);

            if (User == null)
            {
                return(BadRequest(new { message = "Username or password is incorrect" }));
            }

            var ReturnUser = _UserService.Authenticate(User);

            return(Ok(ReturnUser));
        }