using Microsoft.AspNetCore.Http.HttpResults; using Microsoft.AspNetCore.Mvc; using ServiceManager.API.Models; using ServiceManager.API.Services; namespace ServiceManager.API.Controllers { [Route("api/[controller]")] [ApiController] public class ArticlesController : ControllerBase { private readonly IArticlesService _articlesService; public ArticlesController(IArticlesService articlesService) { _articlesService = articlesService; } [HttpGet] public async Task>> GetArticles() { var articles = await _articlesService.GetArticlesAsync(); return Ok(articles); } } }