Пример #1
0
        public async Task <IActionResult> DismissAlert(AlertDismissalEditModel model)
        {
            if (Enum.TryParse <AlertType>(model.AlertType, out var alertTypeEnum))
            {
                await _orchestrator.DismissAlert(User.ToVacancyUser(), alertTypeEnum);
            }

            if (!string.IsNullOrWhiteSpace(model.ReturnUrl))
            {
                return(Redirect(model.ReturnUrl));
            }

            return(RedirectToRoute(RouteNames.Dashboard_Get));
        }
        public async Task <IActionResult> DismissAlert([FromRoute] string employerAccountId, AlertDismissalEditModel model)
        {
            if (Enum.TryParse <AlertType>(model.AlertType, out var alertTypeEnum))
            {
                await _orchestrator.DismissAlert(User.ToVacancyUser(), alertTypeEnum);
            }

            return(RedirectToRoute(RouteNames.Dashboard_Index_Get));
        }