pr1/presence/presence_api/Controllers/GroupController.cs

21 lines
503 B
C#
Raw Normal View History

2024-12-05 09:30:01 +00:00
using Demo.domain.Models;
using Demo.Domain.UseCase;
2024-11-20 17:50:01 +00:00
using Microsoft.AspNetCore.Mvc;
namespace presence_api.Controllers;
[ApiController]
[Route("api/[controller]")]
public class GroupController : ControllerBase
{
private readonly GroupUseCase _groupUseCase;
public GroupController(GroupUseCase groupUseCase)
{
_groupUseCase = groupUseCase;
}
[HttpGet]
public ActionResult<IEnumerable<Group>> getGroups()
{
2024-12-05 09:30:01 +00:00
return Ok(_groupUseCase.GetAllGroups());
2024-11-20 17:50:01 +00:00
}
2024-12-05 09:30:01 +00:00
}