35 lines
679 B
Plaintext
35 lines
679 B
Plaintext
@page "/ForceReset"
|
|
@*@attribute [Authorize]*@
|
|
|
|
@using StockMan.CORE.Data
|
|
@inject StockDataService SDataService
|
|
@inject NavigationManager NavManager
|
|
|
|
|
|
<div class="card">
|
|
<div class="card-header">
|
|
Data Reset
|
|
</div>
|
|
<div class="card-body">
|
|
<h1>@message</h1>
|
|
<LoadingData></LoadingData>
|
|
</div>
|
|
</div>
|
|
|
|
@code {
|
|
protected string message = "Resetting Cache!";
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
await SDataService.FlushRedisCache();
|
|
|
|
message = "Reset done!";
|
|
|
|
// attendo 1 msec
|
|
await Task.Delay(10);
|
|
|
|
// passo a pagina home
|
|
NavManager.NavigateTo("Home");
|
|
}
|
|
|
|
}
|