29 lines
920 B
C#
29 lines
920 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using Swashbuckle.AspNetCore.Annotations;
|
|
using SPMS.Application.DTOs.Banner;
|
|
using SPMS.Application.Interfaces;
|
|
using SPMS.Domain.Common;
|
|
|
|
namespace SPMS.API.Controllers;
|
|
|
|
[ApiController]
|
|
[Route("v1/in/public/banner")]
|
|
[ApiExplorerSettings(GroupName = "public")]
|
|
public class BannerController : ControllerBase
|
|
{
|
|
private readonly IBannerService _bannerService;
|
|
|
|
public BannerController(IBannerService bannerService)
|
|
{
|
|
_bannerService = bannerService;
|
|
}
|
|
|
|
[HttpPost("list")]
|
|
[SwaggerOperation(Summary = "배너 목록", Description = "활성화된 배너 목록을 조회합니다. position으로 필터링 가능.")]
|
|
public async Task<IActionResult> GetListAsync([FromBody] BannerListRequestDto request)
|
|
{
|
|
var result = await _bannerService.GetListAsync(request);
|
|
return Ok(ApiResponse<BannerListResponseDto>.Success(result));
|
|
}
|
|
}
|