2024-06-25 15:03:16 +04:00
|
|
|
using Contracts.ViewModels;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
2024-05-09 17:45:03 +04:00
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
|
|
|
|
|
|
namespace WebApp.Pages
|
|
|
|
{
|
2024-06-25 15:03:16 +04:00
|
|
|
[AllowAnonymous]
|
2024-05-09 17:45:03 +04:00
|
|
|
public class IndexModel : PageModel
|
|
|
|
{
|
2024-06-25 15:03:16 +04:00
|
|
|
public List<ProductViewModel> ProductsModel { get; set; }
|
2024-05-09 17:45:03 +04:00
|
|
|
|
|
|
|
public void OnGet()
|
|
|
|
{
|
2024-06-25 15:03:16 +04:00
|
|
|
ProductsModel = APIClient.GetRequest<List<ProductViewModel>>($"Product/GetFullList");
|
2024-05-09 17:45:03 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|