示例#1
0
        public IActionResult Logout()
        {
            try
            {
                _usersDomain.Logout();

                return(Ok());
            }
            catch (Exception ex)
            {
                _logger.LogCritical(ex.Message);

                return(BadRequest(new { message = MessagesGetter.Get(ErrorPresentationMessages.DefaultErrorMessage) }));
            }
        }
示例#2
0
        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"));
            }
        }