public IActionResult Logout() { try { _usersDomain.Logout(); return(Ok()); } catch (Exception ex) { _logger.LogCritical(ex.Message); return(BadRequest(new { message = MessagesGetter.Get(ErrorPresentationMessages.DefaultErrorMessage) })); } }
public IActionResult Logout() { try { _usersDomain.Logout(); return(RedirectToAction("Index")); } catch (Exception ex) { _logger.LogCritical(ex.Message); TempData.Add(TempDataErrorMessageKey, MessagesGetter.Get(ErrorPresentationMessages.DefaultErrorMessage)); return(RedirectToAction("Index")); } }