feat: add tenant resolve and health endpoints

This commit is contained in:
xiong
2026-07-26 13:28:51 +08:00
parent 00413d6b3b
commit b10e1495c5
6 changed files with 426 additions and 3 deletions

View File

@@ -0,0 +1,24 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Tiku.Api.Contracts;
namespace Tiku.Api.Controllers;
[ApiController]
[AllowAnonymous]
[Produces("application/json")]
[Route("api/health")]
public sealed class HealthController : ControllerBase
{
[HttpGet]
[EndpointSummary("健康检查")]
[EndpointDescription("用于本地、CI 和部署环境 smoke test 的轻量健康检查。")]
[ProducesResponseType<HealthResponseDto>(StatusCodes.Status200OK)]
public ActionResult<HealthResponseDto> Get()
{
return Ok(new HealthResponseDto(
"ok",
"tiku-api",
DateTimeOffset.UtcNow));
}
}