shop info

This commit is contained in:
Tizian.Breuch
2025-09-25 16:38:11 +02:00
parent 654acddf42
commit eb1f58d81f
3 changed files with 15 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
// src/Webshop.Api/Controllers/Public/ShopInfoController.cs
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using Webshop.Application.DTOs.Shop;
@@ -29,10 +30,12 @@ namespace Webshop.Api.Controllers.Public
/// Diese Informationen sind für jeden Besucher sichtbar und werden typischerweise im Footer, auf der Kontaktseite oder im Impressum verwendet.
/// </remarks>
[HttpGet]
public async Task<ActionResult<PublicShopInfoDto>> GetPublicShopInfo()
[ProducesResponseType(typeof(PublicShopInfoDto), StatusCodes.Status200OK)]
public async Task<IActionResult> GetPublicShopInfo()
{
var info = await _shopInfoService.GetPublicShopInfoAsync();
return Ok(info);
var result = await _shopInfoService.GetPublicShopInfoAsync();
// Dieser Service-Aufruf ist so konzipiert, dass er immer ein erfolgreiches Ergebnis liefert.
return Ok(result.Value);
}
}
}