Prevent catalog title changes during edit

Enforce immutability of CatTitle on updates: backend now rejects title changes with a BadRequest, and frontend disables the title input field when editing.
This commit is contained in:
OlgunR
2026-01-19 11:21:33 +01:00
parent 4fbcd0dc11
commit 26f783e835
2 changed files with 5 additions and 1 deletions

View File

@@ -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)