Skip to content

Commit

Permalink
Fix playername field for competitive certs (#605)
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-bstein authored Jan 24, 2025
1 parent fb20b5b commit d7ce665
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit d7ce665

Please sign in to comment.