Index.cshtml.cs 379 B

1234567891011121314
  1. using Application.Abstractions.Messaging;
  2. using Microsoft.AspNetCore.Mvc.RazorPages;
  3. namespace Admin.Pages;
  4. public class IndexModel(IMediator mediator) : PageModel
  5. {
  6. public GetMailHealth.Response MailHealth { get; set; } = new();
  7. public async Task OnGetAsync(CancellationToken ct)
  8. {
  9. MailHealth = await mediator.Send(new GetMailHealth.Query(), ct);
  10. }
  11. }