feat(client): migrate MainLayout.razor to IAuthApiClient
- Replace IAuthService with IAuthApiClient for logout functionality - Add @using JdeScoping.Core.ApiContracts - LogoutAsync now calls AuthApi.LogoutAsync() and navigates to login regardless of API result
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
@inherits LayoutComponentBase
|
||||
@inject IAuthService AuthService
|
||||
@using JdeScoping.Core.ApiContracts
|
||||
@inject IAuthApiClient AuthApi
|
||||
@inject NavigationManager NavigationManager
|
||||
|
||||
<RadzenLayout>
|
||||
@@ -53,7 +54,8 @@
|
||||
@code {
|
||||
private async Task LogoutAsync()
|
||||
{
|
||||
await AuthService.LogoutAsync();
|
||||
// Call logout API - navigate to login regardless of result
|
||||
await AuthApi.LogoutAsync();
|
||||
NavigationManager.NavigateTo("/login");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user