presence/presence_api/Controllers/GroupController.cs

19 lines
479 B
C#
Raw Permalink Normal View History

2024-11-08 17:42:34 +00:00
using Microsoft.AspNetCore.Mvc;
using Demo.Domain.UseCase;
using Demo.Domain.Models;
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());
}
}