Deleted dotnet-tools.json (dotnet-ef config) and IIS publish profiles for .NET 7 and .NET 9 (IISProfileNet7Win64.pubxml, IISProfileNet9Win64.pubxml) to clean up unused deployment and tooling files.
30 lines
945 B
C#
30 lines
945 B
C#
using EnvelopeGenerator.GeneratorAPI.Models.PsPdfKitAnnotation;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.Extensions.Options;
|
|
|
|
namespace EnvelopeGenerator.GeneratorAPI.Controllers;
|
|
|
|
/// <summary>
|
|
/// Exposes configuration data required by the client applications.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Initializes a new instance of <see cref="ConfigController"/>.
|
|
/// </remarks>
|
|
[Route("api/[controller]")]
|
|
[ApiController]
|
|
[Authorize]
|
|
public class ConfigController(IOptionsMonitor<AnnotationParams> annotationParamsOptions) : ControllerBase
|
|
{
|
|
private readonly AnnotationParams _annotationParams = annotationParamsOptions.CurrentValue;
|
|
|
|
/// <summary>
|
|
/// Returns annotation configuration that was previously rendered by MVC.
|
|
/// </summary>
|
|
[HttpGet("Annotations")]
|
|
public IActionResult GetAnnotationParams()
|
|
{
|
|
return Ok(_annotationParams.AnnotationJSObject);
|
|
}
|
|
}
|