first commit

This commit is contained in:
Yaël Perret
2026-04-02 19:19:12 +02:00
commit b4e977948b
60 changed files with 1946 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
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<ActionResult<IEnumerable<Article>>> GetArticles()
{
var articles = await _articlesService.GetArticlesAsync();
return Ok(articles);
}
}
}