29 lines
975 B
C#
29 lines
975 B
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/app")]
|
|
[ApiExplorerSettings(GroupName = "public")]
|
|
public class AppVersionController : ControllerBase
|
|
{
|
|
private readonly IAppConfigService _appConfigService;
|
|
|
|
public AppVersionController(IAppConfigService appConfigService)
|
|
{
|
|
_appConfigService = appConfigService;
|
|
}
|
|
|
|
[HttpPost("version")]
|
|
[SwaggerOperation(Summary = "앱 버전 체크", Description = "현재 앱 버전 정보를 확인하고 업데이트 필요 여부를 반환합니다.")]
|
|
public async Task<IActionResult> CheckVersionAsync([FromBody] AppVersionRequestDto request)
|
|
{
|
|
var result = await _appConfigService.GetAppVersionAsync(request);
|
|
return Ok(ApiResponse<AppVersionResponseDto>.Success(result));
|
|
}
|
|
}
|