using domain.UseCase; using domain.Request; using Microsoft.AspNetCore.Mvc; namespace Presence.API.Controllers { [ApiController] [Route("api/[controller]")] public class AdminController : ControllerBase { private readonly IAdminUseCase _adminUseCase; public AdminController(IAdminUseCase adminUseCase) { _adminUseCase = adminUseCase; } [HttpPost("/group/{groupId}/students")] public IActionResult AddStudentsToGroup(int groupId, [FromBody] AddStudentsToGroupRequest request) { if (request?.Students == null) return BadRequest(); _adminUseCase.AddStudentsToGroup(groupId, request); return NoContent(); } [HttpPost("/group/{groupId}/subjects")] public IActionResult AddSubjectsToGroup(int groupId, [FromBody] AddSubjectsToGroupRequest request) { if (request?.Subjects == null) return BadRequest(); _adminUseCase.AddSubjectsToGroup(groupId, request); return NoContent(); } } }