SPMS_API/SPMS.API/Controllers/TermsController.cs

37 lines
1.2 KiB
C#

using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
using SPMS.Application.DTOs.AppConfig;
using SPMS.Application.Interfaces;
using SPMS.Domain.Common;
namespace SPMS.API.Controllers;
[ApiController]
[Route("v1/in/public")]
[ApiExplorerSettings(GroupName = "public")]
public class TermsController : ControllerBase
{
private readonly IAppConfigService _appConfigService;
public TermsController(IAppConfigService appConfigService)
{
_appConfigService = appConfigService;
}
[HttpPost("terms")]
[SwaggerOperation(Summary = "이용약관", Description = "이용약관 URL을 조회합니다.")]
public async Task<IActionResult> GetTermsAsync()
{
var result = await _appConfigService.GetTermsAsync();
return Ok(ApiResponse<AppConfigResponseDto>.Success(result));
}
[HttpPost("privacy")]
[SwaggerOperation(Summary = "개인정보처리방침", Description = "개인정보처리방침 URL을 조회합니다.")]
public async Task<IActionResult> GetPrivacyAsync()
{
var result = await _appConfigService.GetPrivacyAsync();
return Ok(ApiResponse<AppConfigResponseDto>.Success(result));
}
}