pr1/presence/presence_api/Controllers/GroupController.cs
2024-12-05 12:30:01 +03:00

21 lines
503 B
C#

using Demo.domain.Models;
using Demo.Domain.UseCase;
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()
{
return Ok(_groupUseCase.GetAllGroups());
}
}