Files
TenWholeYears.Server/API/Controllers/Config/V1/ConfigController.cs

18 lines
475 B
C#

using Microsoft.AspNetCore.Mvc;
using RecNet.Application.Common.Interfaces;
namespace API.Controllers.Config.V1;
[Route("api/[controller]/v1")]
[ApiController]
public class ConfigController(IConfigService configService) : ControllerBase
{
[HttpGet("motd")]
public async Task<ActionResult<string>> GetMotd(CancellationToken ct = default)
{
var motd = await configService.GetAsync("Config:MOTD", "Ten Whole Years!", ct);
return Ok(motd);
}
}