Files
GestionIntegralWeb/Backend/GestionIntegral.Api/Controllers/Suscripciones/FormasDePagoController.cs

27 lines
797 B
C#

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);
}
}
}