refactor(storage): scope exports by owner
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user