w4c-workflows-api/Controllers/AboutController.cs

30 lines
797 B
C#
Raw Permalink Normal View History

2026-09-09 13:09:48 +00:00
using Microsoft.AspNetCore.Mvc;
using w4c_workflows.Services;
namespace w4c_workflows.Controllers;
/// <summary>
/// Self-description of this workflows-api instance. Public (no operator key):
/// the frontend uses it to show the platform runtime's name/version in the
/// runtime selector, and self-hosted runtimes report the same shape when they
/// connect. Contains no sensitive data.
/// </summary>
[ApiController]
[Route("api/about")]
public class AboutController : ControllerBase
{
private readonly RuntimeSelfInfoProvider _info;
public AboutController(RuntimeSelfInfoProvider info)
{
_info = info;
}
[HttpGet]
public IActionResult Get()
{
var i = _info.Get();
return Ok(new { i.Name, i.Version, i.StartedAt, i.MultiTenant });
}
}