public async Task <IActionResult> OnPostAsync()
        {
            var alertToDismiss = await alertRepository.GetAlertByIdAsync(AlertId);

            if (alertToDismiss is null)
            {
                return(BadRequest());
            }

            if (await authorizationService.IsUserAuthorizedToManageAlert(User, alertToDismiss))
            {
                await alertService.DismissAlertAsync(AlertId, User.Username());
            }

            if (Request.Query["page"] == "Overview")
            {
                return(RedirectToPage("/Notifications/Overview", new { alertToDismiss.NotificationId }));
            }

            return(RedirectToPage("/Index"));
        }