mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 04:20:55 +00:00
22 lines
756 B
C#
22 lines
756 B
C#
using CartriX.Api.Interfaces;
|
|
using CartriX.Api.Mappers;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace CartriX.Api.Controllers
|
|
{
|
|
[Route("api/[controller]")]
|
|
[ApiController]
|
|
public class ArticleController : ControllerBase
|
|
{
|
|
private readonly IArticleService _articleService;
|
|
public ArticleController(IArticleService articleService)
|
|
{
|
|
_articleService = articleService;
|
|
}
|
|
|
|
[HttpGet(nameof(List))] public async Task<IActionResult> List() => Ok(await _articleService.List());
|
|
|
|
[HttpGet("ListArticlesByName")]
|
|
public async Task<IActionResult> GetListArticlesByModelName([FromQuery]string NameModel) => Ok(await _articleService.GetListArticlesByModelNameAsync(NameModel));
|
|
}
|
|
} |