GetDataProductsByManufacturer
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user