feat(backend): add knowledge base, innovation library and trends modules
Add knowledge item and innovation CRUD with search/filtering, published-only visibility for non-staff, admin publish/update, challenge dictionary, problem aggregation with trends (admin only) and canonical embedding text preparation for matchmaking.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
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/social-challenges")]
|
||||
[Authorize]
|
||||
public class SocialChallengesController : ControllerBase
|
||||
{
|
||||
private readonly IChallengeService _challenges;
|
||||
|
||||
public SocialChallengesController(IChallengeService challenges)
|
||||
{
|
||||
_challenges = challenges;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public async Task<ActionResult<IReadOnlyList<SocialChallengeResponse>>> List(
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
var challenges = await _challenges.ListAsync(cancellationToken);
|
||||
|
||||
return Ok(challenges);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user