Files
EnvelopeGenerator/EnvelopeGenerator.WebUI/EnvelopeGenerator.WebUI/Controllers/ConfigController.cs
TekH e11bc9df8e Add new controllers for envelope management
Introduced multiple controllers to enhance application functionality:
- `AnnotationController`: Manages annotations and signature lifecycle.
- `AuthController`: Handles user authentication and session management.
- `CacheController`: Manages cached data for receivers.
- `ConfigController`: Exposes client configuration data.
- `DocumentController`: Provides access to envelope documents.
- `EmailTemplateController`: Manages email templates.
- `EnvelopeController`: Manages envelope operations.
- `EnvelopeReceiverController`: Handles envelope receiver data.
- `EnvelopeTypeController`: Retrieves envelope types.
- `HistoryController`: Accesses envelope history.
- `IAuthController`: Defines authentication interface.
- `LocalizationController`: Manages localization settings.
- `ReadOnlyController`: Manages read-only envelope sharing.
- `ReceiverController`: Retrieves receiver data.
- `SignatureController`: Retrieves document signatures.
- `TfaRegistrationController`: Manages two-factor authentication.

These changes improve maintainability and scalability by organizing operations into dedicated controllers.
2026-06-22 14:57:26 +02:00

31 lines
979 B
C#

using EnvelopeGenerator.API.Models.PsPdfKitAnnotation;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
namespace EnvelopeGenerator.API.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")]
[Obsolete("PSPDF Kit will no longer be used.")]
public IActionResult GetAnnotationParams()
{
return Ok(_annotationParams.AnnotationJSObject);
}
}