using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using WorkFlow.API.Attributes; using WorkFlow.Application.Contracts; using WorkFlow.Domain.Entities; namespace WorkFlow.API.Controllers; [APIKeyAuth] [Route("api/[controller]")] [ApiController] [Authorize] public class ProfileController : ControllerBase { public static readonly Profile Default = new () { Id = 1, TypeId = 1, Caption = "VA Freigabe", Subtitle = "Freigabe in Rolle Verantwortlich", CountObj = 2, ForeColor = "Yellow", BackColor = "Black" }; private readonly ILogger _logger; private readonly IProfileService _service; public ProfileController(ILogger logger, IProfileService service) { _logger = logger; _service = service; } [HttpGet] [Authorize] public IActionResult GetAsync() { try { return Ok(Default); } catch (Exception ex) { _logger.LogError(ex, "{Message}", ex.Message); return StatusCode(500); } } }