Files
TelegramMemeVault/src/MemeVault.Api/Controllers/BotController.cs
T

21 lines
608 B
C#
Raw Normal View History

2026-10-11 14:26:30 +04:00
using MemeVault.Api.Services;
using Microsoft.AspNetCore.Mvc;
namespace MemeVault.Api.Controllers;
[ApiController]
[Route("api/bot")]
public sealed class BotController(BotInfoService botInfo) : ControllerBase
{
/// <summary>
/// Возвращает публичный username бота.
/// Не требует авторизации — username бота публичен.
/// </summary>
[HttpGet("info")]
public async Task<IActionResult> GetInfo(CancellationToken ct)
{
var username = await botInfo.GetBotUsernameAsync();
return Ok(new { username });
}
}