presence_new/presence_api/Controllers/GroupController/GroupController.cs

28 lines
670 B
C#
Raw Normal View History

2024-11-16 12:02:17 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using presence.data.RemoteData.RemoteDataBase.DAO;
using presence.domain.Models;
using presence.domain.UseCase;
namespace presence.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>> GetAllGroups()
{
return Ok(_groupUseCase.GetAllGroups());
}
}