eShopOnContainers/src/Web/WebhookClient/Pages/WebhooksList.cshtml.cs
2020-12-28 15:10:01 +05:30

25 lines
643 B
C#

using Microsoft.AspNetCore.Mvc.RazorPages;
using System.Collections.Generic;
using System.Threading.Tasks;
using WebhookClient.Models;
using WebhookClient.Services;
namespace WebhookClient.Pages
{
public class WebhooksListModel : PageModel
{
private readonly IWebhooksClient _webhooksClient;
public IEnumerable<WebhookResponse> Webhooks { get; private set; }
public WebhooksListModel(IWebhooksClient webhooksClient)
{
_webhooksClient = webhooksClient;
}
public async Task OnGet()
{
Webhooks = await _webhooksClient.LoadWebhooks();
}
}
}