Holy moly......
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user