refactor(storage): scope exports by owner
CI and Deploy / test (pull_request) Successful in 5m24s
CI and Deploy / deploy (pull_request) Has been skipped

This commit is contained in:
cesnimda
2026-08-15 18:19:59 +02:00
parent 0d487123af
commit cdcc7163fa
17 changed files with 123 additions and 38 deletions
@@ -62,7 +62,7 @@ namespace JobTrackerApi.Controllers
private sealed class ThrowingCvPdfExporter : ICvPdfExporter
{
public Task<CvPdfArtifact> ExportAsync(TailoredCvRenderResult renderResult, CancellationToken cancellationToken)
public Task<CvPdfArtifact> ExportAsync(string ownerUserId, TailoredCvRenderResult renderResult, CancellationToken cancellationToken)
{
throw new InvalidOperationException("CV PDF export is not configured for this controller instance.");
}
@@ -1736,7 +1736,7 @@ Candidate CV/profile:
? null
: AvatarStorage.Resolve(user.AvatarImageDataUrl);
var rendered = RenderTailoredCv(job, document, user, photoDataUrl);
var artifact = await _cvPdfExporter.ExportAsync(rendered, cancellationToken);
var artifact = await _cvPdfExporter.ExportAsync(user.Id, rendered, cancellationToken);
return File(artifact.Bytes, "application/pdf", artifact.FileName);
}