This commit is contained in:
Tizian.Breuch
2025-08-01 10:06:00 +02:00
parent 8a4590ee5a
commit 6f86d0de87
15 changed files with 79 additions and 79 deletions

View File

@@ -1,4 +1,4 @@
// src/Webshop.Api/Controllers/Public/CategoriesController.cs
// src/Webshop.Api/Controllers/Public/categorysController.cs
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
@@ -9,22 +9,22 @@ using Webshop.Application.Services.Public;
namespace Webshop.Api.Controllers.Public
{
[ApiController]
[Route("api/v1/public/categories")]
[Route("api/v1/public/categorys")]
[AllowAnonymous]
public class CategorysController : ControllerBase
public class CategoryController : ControllerBase
{
private readonly ICategoryService _categoryService;
public CategorysController(ICategoryService categoryService)
public CategoryController(ICategoryService categoryService)
{
_categoryService = categoryService;
}
[HttpGet]
public async Task<ActionResult<IEnumerable<CategoryDto>>> GetActiveCategories()
public async Task<ActionResult<IEnumerable<CategoryDto>>> GetActivecategorys()
{
var categories = await _categoryService.GetAllActiveAsync();
return Ok(categories);
var categorys = await _categoryService.GetAllActiveAsync();
return Ok(categorys);
}
[HttpGet("{slug}")]