cc nasazeni

This commit is contained in:
JiriUhlir
2026-06-12 13:18:35 +02:00
parent bbec747bb7
commit 1801d02e5c
89 changed files with 3541 additions and 16 deletions
+29
View File
@@ -0,0 +1,29 @@
using Microsoft.AspNetCore.Mvc;
using Idoklad.Services;
namespace Idoklad.Controllers;
/// <summary>
/// Account agenda: the current agenda (company) and current user. Requires iDoklad credentials
/// (headers or environment defaults).
/// </summary>
[ApiController]
[Route("account")]
[Produces("application/json")]
[Tags("Account")]
public sealed class AccountController : ControllerBase
{
private readonly AccountService _service;
public AccountController(AccountService service) => _service = service;
/// <summary>Get information about the current agenda (company).</summary>
[HttpGet("agenda")]
public async Task<IActionResult> Agenda(CancellationToken ct)
=> Ok(await _service.CurrentAgendaAsync(ct));
/// <summary>Get information about the current user.</summary>
[HttpGet("user")]
public async Task<IActionResult> CurrentUser(CancellationToken ct)
=> Ok(await _service.CurrentUserAsync(ct));
}