feat(ideas): add idea creator, grant calls and applications
Implement the idea creator and application generator: idea status workflow, social canvas card, grant call windows with 409 when closed, and an LLM-backed idea assistant with offline fallback.
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
using Asp.Versioning;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using TarninaHub.Application.Abstractions;
|
||||
using TarninaHub.Application.Dtos;
|
||||
|
||||
namespace TarninaHub.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[ApiVersion("1.0")]
|
||||
[Route("api/grant-calls")]
|
||||
[Authorize]
|
||||
public class GrantCallsController : ControllerBase
|
||||
{
|
||||
private readonly IGrantCallService _grantCalls;
|
||||
|
||||
public GrantCallsController(IGrantCallService grantCalls)
|
||||
{
|
||||
_grantCalls = grantCalls;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public async Task<ActionResult<IReadOnlyList<GrantCallResponse>>> List(
|
||||
[FromQuery] string? status,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
var calls = await _grantCalls.ListAsync(status, cancellationToken);
|
||||
|
||||
return Ok(calls);
|
||||
}
|
||||
|
||||
[HttpGet("{grantCallId}")]
|
||||
public async Task<ActionResult<GrantCallResponse>> GetById(
|
||||
string grantCallId,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
var call = await _grantCalls.GetAsync(grantCallId, cancellationToken);
|
||||
|
||||
return call is null ? NotFound() : Ok(call);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user