mirror of
https://github.com/farcasclaudiu/PracticeCalendar.git
synced 2026-06-22 11:01:27 +03:00
23 lines
658 B
C#
23 lines
658 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using PracticeCalendar.API.Controllers;
|
|
using PracticeCalendar.Application.Products.Queries;
|
|
using PracticeCalendar.Application.Products.Queries.GetProducts;
|
|
|
|
namespace PracticeCalendar.Api.Controllers
|
|
{
|
|
public class ProductsController : ApiControllerBase
|
|
{
|
|
private readonly ILogger<ProductsController> logger;
|
|
|
|
public ProductsController(ILogger<ProductsController> logger)
|
|
{
|
|
this.logger = logger;
|
|
}
|
|
|
|
[HttpGet]
|
|
public async Task<ActionResult<List<ProductDto>>> Get()
|
|
{
|
|
return await Mediator.Send(new GetProductsQuery());
|
|
}
|
|
}
|
|
} |