コード例 #1
0
        public IActionResult LoginAccount(AddLoginRequest request)
        {
            if (request == null)
            {
                return(BadRequest(new { message = "Please check your input" }));
            }
            if (repository.CheckCredentials(request))
            {
                return(Unauthorized(new { message = "Incorrect Email or password" }));
            }

            return(Ok(repository.LoginAccount(request)));
        }