public async Task <IActionResult> Login(LoginFields info) { if (User.Identity.IsAuthenticated) { return(RedirectToAction("Browse", "Thesis")); } if (ModelState.IsValid) { var result = await _userService.LoginUser(info.Email, info.Password); if (!result.Succeeded) { ModelState.AddModelError("Greška", "Pogrešna email adresa ili šifra"); return(View(info)); } return(RedirectToAction("Browse", "Thesis")); } return(View(info)); }
public HttpResponseMessage Post([FromBody] LoginFields value) { return(null); }