Skip to content

Commit

Permalink
Use instance.Org in place of the parameter org where available
Browse files Browse the repository at this point in the history
  • Loading branch information
SandGrainOne committed Oct 24, 2024
1 parent bc3ddf5 commit 32b64e3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Storage/Controllers/ContentOnDemandController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public async Task<ActionResult> GetSignatureAsHtml([FromRoute] string org, [From

List<SignatureView> view = await JsonSerializer.DeserializeAsync<List<SignatureView>>(
await _blobRepository.ReadBlob(
$"{(_generalSettings.A2UseTtdAsServiceOwner ? "ttd" : org)}",
$"{org}/{app}/{instanceGuid}/data/{signatureElement.Id}",
$"{(_generalSettings.A2UseTtdAsServiceOwner ? "ttd" : instance.Org)}",
$"{instance.Org}/{app}/{instanceGuid}/data/{signatureElement.Id}",
application.StorageContainerNumber));

return View("Signature", view);
Expand All @@ -104,8 +104,8 @@ public async Task<ActionResult> GetPaymentAsHtml([FromRoute] string org, [FromRo

PaymentView view = await JsonSerializer.DeserializeAsync<PaymentView>(
await _blobRepository.ReadBlob(
$"{(_generalSettings.A2UseTtdAsServiceOwner ? "ttd" : org)}",
$"{org}/{app}/{instanceGuid}/data/{paymentElement.Id}",
$"{(_generalSettings.A2UseTtdAsServiceOwner ? "ttd" : instance.Org)}",
$"{instance.Org}/{app}/{instanceGuid}/data/{paymentElement.Id}",
application.StorageContainerNumber));

return View("Payment", view);
Expand Down Expand Up @@ -133,7 +133,7 @@ public async Task<Stream> GetFormdataAsPdf([FromRoute] string org, [FromRoute] s
int lformid = int.Parse(xmlElement.Metadata.First(m => m.Key == "lformid").Value);
PrintViewXslBEList xsls = [];
int pageNumber = 1;
foreach ((string xsl, bool isPortrait) in await _a2Repository.GetXsls(org, app, lformid, language, 3))
foreach ((string xsl, bool isPortrait) in await _a2Repository.GetXsls(instance.Org, app, lformid, language, 3))
{
if (visiblePages == null || visiblePages.Contains(pageNumber))
{
Expand Down Expand Up @@ -220,7 +220,7 @@ private async Task<Stream> GetFormdataAsHtmlInternal(string org, string app, Gui
PrintViewXslBEList xsls = [];
int lformid = int.Parse(xmlElement.Metadata.First(m => m.Key == "lformid").Value);
int pageNumber = 1;
foreach ((string xsl, bool isPortrait) in await _a2Repository.GetXsls(org, app, lformid, language, viewType))
foreach ((string xsl, bool isPortrait) in await _a2Repository.GetXsls(instance.Org, app, lformid, language, viewType))
{
if ((singlePageNr != -1 && singlePageNr == pageNumber) || (singlePageNr == -1 && (visiblePages == null || visiblePages.Contains(pageNumber))))
{
Expand All @@ -234,7 +234,7 @@ private async Task<Stream> GetFormdataAsHtmlInternal(string org, string app, Gui

return _a2OndemandFormattingService.GetFormdataHtml(
xsls,
await _blobRepository.ReadBlob($"{(_generalSettings.A2UseTtdAsServiceOwner ? "ttd" : org)}", $"{org}/{app}/{instanceGuid}/data/{xmlElement.Id}", application.StorageContainerNumber),
await _blobRepository.ReadBlob($"{(_generalSettings.A2UseTtdAsServiceOwner ? "ttd" : instance.Org)}", $"{instance.Org}/{app}/{instanceGuid}/data/{xmlElement.Id}", application.StorageContainerNumber),
xmlElement.Created.ToString());
}
}
Expand Down

0 comments on commit 32b64e3

Please sign in to comment.