This commit is contained in:
2026-05-08 13:31:41 +03:00
parent 845f41255f
commit 86d4d2af06
8 changed files with 114 additions and 0 deletions
+7
View File
@@ -2,6 +2,7 @@ using Models.Settings;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using Swashbuckle.AspNetCore.Annotations;
namespace Api.Controllers
{
@@ -29,6 +30,9 @@ namespace Api.Controllers
/// </summary>
/// <returns>200 OK with the Tag Manager ID as a string.</returns>
[HttpGet("tagmanager")]
[SwaggerOperation(Summary = "Get Google Tag Manager ID", Description = "Returns the Google Tag Manager ID configured for frontend analytics.")]
[SwaggerResponse(StatusCodes.Status200OK, "Tag Manager ID returned")]
[ProducesResponseType(StatusCodes.Status200OK)]
public async Task<IActionResult> GetTagManagerId(CancellationToken ct)
{
return Ok(_googleSettings.TagManagerId);
@@ -41,6 +45,9 @@ namespace Api.Controllers
/// </summary>
/// <returns>200 OK with the maps API key as a string.</returns>
[HttpGet("maps")]
[SwaggerOperation(Summary = "Get Google Maps key", Description = "Returns the Google Maps API key configured for frontend map features.")]
[SwaggerResponse(StatusCodes.Status200OK, "Maps API key returned")]
[ProducesResponseType(StatusCodes.Status200OK)]
public async Task<IActionResult> GetMapKey(CancellationToken ct)
{
return Ok(_googleSettings.MapKey);