fix: preserve blank CVs and reliable editor undo

This commit is contained in:
cesnimda
2026-10-27 07:37:03 +01:00
parent 5d4b8f23ce
commit 663023a088
22 changed files with 950 additions and 101 deletions
@@ -240,6 +240,7 @@ public sealed class CvVariantController : ControllerBase
{
var render = await _variants.RenderAsync(user.Id, id, Person(user), ct, expectedVersion);
if (render is null) return NotFound();
if (!render.HasContent) return BadRequest(new { code = "cv_empty_content" });
var artifact = await _pdf.ExportAsync(user.Id, new TailoredCvRenderResult(render.ThemeId, render.SuggestedFileName, render.Html), ct);
return File(artifact.Bytes, "application/pdf", artifact.FileName);
}