diff --git a/DbFirst.API/Controllers/CatalogsController.cs b/DbFirst.API/Controllers/CatalogsController.cs index b2b0f66..103d386 100644 --- a/DbFirst.API/Controllers/CatalogsController.cs +++ b/DbFirst.API/Controllers/CatalogsController.cs @@ -54,6 +54,10 @@ public class CatalogsController : ControllerBase { return NotFound(); } + if (!string.Equals(current.CatTitle, dto.CatTitle, StringComparison.OrdinalIgnoreCase)) + { + return BadRequest("Titel kann nicht geändert werden."); + } var updated = await _mediator.Send(new UpdateCatalogCommand(id, dto), cancellationToken); if (updated == null) diff --git a/DbFirst.BlazorWasm/Pages/Catalogs.razor b/DbFirst.BlazorWasm/Pages/Catalogs.razor index 0486b46..2c2ef09 100644 --- a/DbFirst.BlazorWasm/Pages/Catalogs.razor +++ b/DbFirst.BlazorWasm/Pages/Catalogs.razor @@ -24,7 +24,7 @@ else if (!string.IsNullOrWhiteSpace(infoMessage))
- +