shop info
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user