Files
Hy2026/backend/Controllers/MatchmakingController.cs
T
Rafał Tyński fa1199539b feat(backend): add communication, tester, admin and middleman modules
Implement step 17 modules: threads/messages, notifications with automation (submission.created, idea.created, grant_call.opened), innovation test feedback, admin panel (submissions, verify, metrics, grant call status), Middleman adaptation and partnerships. Split multi-type files into one type per file and replace object-valued dictionaries with string-valued maps in data contracts (migrations 0006/0007).
2026-10-04 03:49:45 +02:00

32 lines
879 B
C#

using Asp.Versioning;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using TarninaHub.Application.Abstractions;
using TarninaHub.Application.Security;
namespace TarninaHub.Controllers;
[ApiController]
[ApiVersion("1.0")]
[Route("api/matchmaking")]
[Authorize]
public class MatchmakingController : ControllerBase
{
private readonly IMatchmakingService _matchmakingService;
public MatchmakingController(IMatchmakingService matchmakingService)
{
_matchmakingService = matchmakingService;
}
[HttpPost("reindex")]
[Authorize(Policy = Policies.AdminOnly)]
public async Task<ActionResult<MatchmakingReindexResponse>> Reindex(CancellationToken cancellationToken)
{
var indexed = await _matchmakingService.ReindexAsync(cancellationToken);
return Ok(new MatchmakingReindexResponse(indexed));
}
}