Feat: Se agregan servicios y controladores para ABM de suscriptores
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using GestionIntegral.Api.Services.Suscripciones;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace GestionIntegral.Api.Controllers.Suscripciones
|
||||
{
|
||||
[Route("api/formaspago")]
|
||||
[ApiController]
|
||||
[Authorize] // Solo usuarios logueados pueden ver esto
|
||||
public class FormasDePagoController : ControllerBase
|
||||
{
|
||||
private readonly IFormaPagoService _formaPagoService;
|
||||
|
||||
public FormasDePagoController(IFormaPagoService formaPagoService)
|
||||
{
|
||||
_formaPagoService = formaPagoService;
|
||||
}
|
||||
|
||||
// GET: api/formaspago
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> GetAll()
|
||||
{
|
||||
var formasDePago = await _formaPagoService.ObtenerTodos();
|
||||
return Ok(formasDePago);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user