31 lines
806 B
C#
31 lines
806 B
C#
|
|
|
|
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();
|
|
}
|
|
}
|