Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.28.5 #605

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ public async Task<FileResult> GetPracticeCertificatePdf([FromRoute] string userI
[HttpGet]
[Route("user/{userId}/certificates/competitive/{awardedForEntityId}")]
[AllowAnonymous] // anyone can _try_, but we only serve them the cert if it's published (or if they're the owner)
public async Task<FileResult> GetCompetitiveCertificatePng([FromRoute] string userId, [FromRoute] string awardedForEntityId, CancellationToken cancellationToken)
public async Task<FileResult> GetCompetitiveCertificatePng([FromRoute] string userId, [FromRoute] string awardedForEntityId, [FromQuery] string requestedNameOverride, CancellationToken cancellationToken)
{
var html = await _mediator.Send(new GetCompetitiveModeCertificateHtmlQuery(awardedForEntityId, userId, _actingUser.Get().Id), cancellationToken);
var html = await _mediator.Send(new GetCompetitiveModeCertificateHtmlQuery(awardedForEntityId, userId, requestedNameOverride), cancellationToken);
return File(await _htmlToImage.ToPng($"{_actingUser.Get().Id}_{awardedForEntityId}.png", html, 3300, 2550), MimeTypes.ImagePng);
}

Expand Down