Add project
All checks were successful
SanStudent Multi-Project Deployment / deploy-api (push) Successful in 41s
SanStudent Multi-Project Deployment / deploy-frontadmin (push) Successful in 41s
SanStudent Multi-Project Deployment / deploy-frontstudent (push) Successful in 40s

This commit is contained in:
aherman-san
2026-03-07 11:14:26 +01:00
parent bca807d4c1
commit b8f03bf6d3
191 changed files with 122377 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
using Api.Services.Interfaces;
using Common.Dtos.Season;
using Common.Dtos.Specialization;
using Microsoft.AspNetCore.Mvc;
namespace Api.Controllers;
[ApiController]
public class SpecializationController(ISpecializationService service) : ControllerBase
{
private readonly ISpecializationService _service = service;
[HttpPost]
[Route("admin/specialization/create")]
public async Task<ActionResult> CreateAsync([FromBody] CreateSpecializationRequest request)
{
var result = await _service.CreateAsync(request);
return result.Ok ? Ok(result.CreateSpecializationResult) : Conflict(result.Error);
}
[HttpGet]
[Route("admin/specialization")]
public async Task<ActionResult> GetAllAsync()
{
var result = await _service.GetAllAsync();
return result.Length != 0 ? Ok(result) : NoContent();
}
[HttpGet]
[Route("admin/specialization/paged")]
public async Task<ActionResult> GetAllPagedAsync([FromQuery] GetSpecializationsRequest request)
{
var result = await _service.GetAllPagedAsync(request);
return Ok(result);
}
}