Holy moly......

This commit is contained in:
lumijiez
2025-06-26 01:30:25 +03:00
parent 3cdfbf8954
commit a8ea4b41ee
34 changed files with 238 additions and 42 deletions

View File

@@ -34,7 +34,7 @@ public class ProductsController(IMediator mediator) : ControllerBase
[Authorize(Roles = "Admin")]
public async Task<ActionResult<ProductDto>> UpdateProduct(
Guid id,
[FromBody] UpdateProductCommand command)
[FromBody] UpdateProduct command)
{
if (id != command.Id) return BadRequest("ID mismatch");

View File

@@ -24,7 +24,7 @@ public static class Startup
services.AddDatabaseContexts(builder.Configuration);
services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(typeof(CreateProductHandler).Assembly));
services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(typeof(CreateProduct).Assembly));
services.AddValidatorsFromAssembly(typeof(Auth0UserValidator).Assembly);