GetDataProductsByManufacturer

This commit is contained in:
2025-04-06 13:41:29 +04:00
parent e561eb91d3
commit dead17cca0
13 changed files with 255 additions and 7 deletions

View File

@@ -1,11 +1,20 @@
using CatHasPawsContratcs.AdapterContracts;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace CatHasPawsWebApi.Controllers;
[Route("api/[controller]")]
[Authorize]
[Route("api/[controller]/[action]")]
[ApiController]
public class ReportController(IReportAdapter reportAdapter) : ControllerBase
public class ReportController(IReportAdapter adapter) : ControllerBase
{
private IReportAdapter _reportAdapter = reportAdapter;
private readonly IReportAdapter _adapter = adapter;
[HttpGet]
[Consumes("application/json")]
public async Task<IActionResult> GetProducts(CancellationToken ct)
{
return (await _adapter.GetDataProductsByManufacturerAsync(ct)).GetResponse(Request, Response);
}
}