presence/presence_api/Controllers/GroupController.cs

27 lines
502 B
C#
Raw Permalink Normal View History

2024-11-11 10:42:08 +00:00
using domain.Models;
using domain.UseCase;
using Microsoft.AspNetCore.Mvc;
namespace presence_api.Controllers;
[ApiController]
2024-11-14 08:01:32 +00:00
[Route ("api/[controller]")]
2024-11-11 10:42:08 +00:00
public class GroupController: ControllerBase
{
private readonly GroupUseCase _groupUseCase;
public GroupController(GroupUseCase groupUseCase)
{
_groupUseCase = groupUseCase;
}
[HttpGet]
public ActionResult<IEnumerable<Group>> getGroups()
{
return Ok(_groupUseCase.GetAllGroups());
}
}