22 lines
568 B
C#
22 lines
568 B
C#
using CandyHouseContracts.AdapterContracts;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace CandyHouseWebApi.Controllers;
|
|
|
|
[Authorize]
|
|
[Route("api/[controller]")]
|
|
[ApiController]
|
|
[Produces("application/json")]
|
|
public class PostHistoryController(IPostAdapter adapter) : ControllerBase
|
|
{
|
|
private readonly IPostAdapter _adapter = adapter;
|
|
|
|
[HttpGet("{id}")]
|
|
public IActionResult GetHistory(string id)
|
|
{
|
|
return _adapter.GetHistory(id).GetResponse(Request, Response);
|
|
}
|
|
}
|