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).
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using Asp.Versioning;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using TarninaHub.Application.Abstractions;
|
||||
using TarninaHub.Application.Dtos;
|
||||
using TarninaHub.Application.Security;
|
||||
|
||||
namespace TarninaHub.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[ApiVersion("1.0")]
|
||||
[Route("api/middleman")]
|
||||
[Authorize(Policy = Policies.JstOrAbove)]
|
||||
public class MiddlemanController : ControllerBase
|
||||
{
|
||||
private readonly IMiddlemanService _middleman;
|
||||
|
||||
public MiddlemanController(IMiddlemanService middleman)
|
||||
{
|
||||
_middleman = middleman;
|
||||
}
|
||||
|
||||
[HttpPost("adapt")]
|
||||
public async Task<ActionResult<MiddlemanResponse>> Adapt(
|
||||
MiddlemanRequest request,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
var response = await _middleman.AdaptAsync(request, cancellationToken);
|
||||
|
||||
return response is null ? NotFound() : Ok(response);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user