Ejemplo n.º 1
0
        public IActionResult Authenticate([FromBody] Kullanici userParam)
        {
            try
            {
                var user = _userService.Authenticate(userParam.KullaniciAdi, userParam.Sifre);

                if (user == null)
                {
                    return(BadRequest(new { message = "Kullanici veya şifre hatalı!" }));
                }

                return(Ok(user));
            }
            catch (Exception ex)
            {
                FileProccess.WriteLog(ex.Message);

                return(BadRequest());
            }
        }