27 lines
505 B
C#
27 lines
505 B
C#
using domain.Models;
|
|
using domain.UseCase;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace presence_api.Controllers;
|
|
[ApiController]
|
|
[Route ("api/[apicontroller]")]
|
|
|
|
public class GroupController: ControllerBase
|
|
{
|
|
private readonly GroupUseCase _groupUseCase;
|
|
|
|
public GroupController(GroupUseCase groupUseCase)
|
|
{
|
|
_groupUseCase = groupUseCase;
|
|
}
|
|
|
|
[HttpGet]
|
|
public ActionResult<IEnumerable<Group>> getGroups()
|
|
{
|
|
return Ok(_groupUseCase.GetAllGroups());
|
|
}
|
|
}
|
|
|
|
|
|
|