AppSettings.ApiUrl

This commit is contained in:
2023-01-19 16:45:16 -07:00
parent a4d3a9899f
commit 10c823dca8
10 changed files with 202 additions and 39 deletions

View File

@ -7,6 +7,7 @@ public partial class Export
{
[Inject] protected IJSRuntime? JSRuntime { get; set; }
[Inject] protected Models.AppSettings? AppSettings { get; set; }
[Parameter] public Metrology.Shared.ViewModels.Export? Model { get; set; }
public Export()
@ -25,7 +26,9 @@ public partial class Export
{
if (JSRuntime is null)
throw new NullReferenceException(nameof(JSRuntime));
return JSRuntime.InvokeVoidAsync("initExport", DateTime.Now.AddMonths(-1), DateTime.Now).AsTask();
if (AppSettings is null)
throw new NullReferenceException(nameof(AppSettings));
return JSRuntime.InvokeVoidAsync("initExport", AppSettings.ApiUrl, DateTime.Now.AddMonths(-1), DateTime.Now).AsTask();
}
return Task.CompletedTask;
}