ZhiYi/ZhiYi.Core.Api/Controllers/CaptchaController.cs

31 lines
806 B
C#
Raw Permalink Normal View History

2025-02-21 01:14:39 +00:00

namespace ZhiYi.Core.Api.Controllers
{
/// <summary>
/// 验证码管理
/// </summary>
[Route("api/captcha/[action]")]
[ApiController]
public class CaptchaController : ControllerBase
{
private readonly ICaptchaAppService _captchaAppService;
/// <summary>
///
/// </summary>
/// <param name="captchaAppService"></param>
public CaptchaController(ICaptchaAppService captchaAppService)
{
_captchaAppService = captchaAppService;
}
/// <summary>
/// 获取验证码
/// </summary>
/// <returns></returns>
[HttpGet]
public async Task<ActionResult<CaptchaResponseDto>> GetCaptchaAsync()
=> await _captchaAppService.GetCaptchaAsync();
}
}