using Microsoft.AspNetCore.Mvc; using Idoklad.Services; namespace Idoklad.Controllers; /// /// Account agenda: the current agenda (company) and current user. Requires iDoklad credentials /// (headers or environment defaults). /// [ApiController] [Route("account")] [Produces("application/json")] [Tags("Account")] public sealed class AccountController : ControllerBase { private readonly AccountService _service; public AccountController(AccountService service) => _service = service; /// Get information about the current agenda (company). [HttpGet("agenda")] public async Task Agenda(CancellationToken ct) => Ok(await _service.CurrentAgendaAsync(ct)); /// Get information about the current user. [HttpGet("user")] public async Task CurrentUser(CancellationToken ct) => Ok(await _service.CurrentUserAsync(ct)); }