Example #1
0
        public IActionResult Giris(Kullanici param)
        {
            if (string.IsNullOrEmpty(param.Eposta) ||
                string.IsNullOrEmpty(param.Parola))
            {
                return(Content(AppResponse.Return(400, "")));
            }

            Kullanici kullanici = Kullanici.Giris(param.Eposta, param.Parola, "WEB", "");

            if (string.IsNullOrEmpty(kullanici.Token))
            {
                return(Content(AppResponse.Return(297, "Eposta adresi veya parola hatalı")));
            }

            return(Content(AppResponse.Return(200, kullanici)));
        }