Sikeres POST az eszközről
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using WorkFlowCheck.Common.DTO;
|
||||
using WorkFlowCheck.MAUI.Services;
|
||||
|
||||
namespace WorkFlowCheck.MAUI
|
||||
@@ -9,8 +10,44 @@ namespace WorkFlowCheck.MAUI
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
MainPage = serviceProvider.GetRequiredService<MainPage>();
|
||||
//MainPage = serviceProvider.GetRequiredService<MainPage>();
|
||||
MainPage = new AppShell();
|
||||
|
||||
}
|
||||
protected async override void OnResume()
|
||||
{
|
||||
base.OnResume();
|
||||
var isLogged = await SecureStorage.Default.GetAsync("WFCUser");
|
||||
if (isLogged == null)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
protected override void OnSleep()
|
||||
{
|
||||
SecureStorage.Default.Remove("WFCUser");
|
||||
base.OnSleep();
|
||||
}
|
||||
protected async override void OnStart()
|
||||
{
|
||||
base.OnStart();
|
||||
SecureStorage.Default.Remove("WFCUser");
|
||||
await Shell.Current.GoToAsync("//LoginPage");
|
||||
}
|
||||
private async Task<ApiResponseDTO<UserDTO>> CheckSecurity()
|
||||
{
|
||||
var isLogged = await SecureStorage.Default.GetAsync("WFCUser");
|
||||
if (isLogged == null)
|
||||
{
|
||||
return new ApiResponseDTO<UserDTO>()
|
||||
{
|
||||
IsSuccess = false
|
||||
};
|
||||
}
|
||||
return new ApiResponseDTO<UserDTO>()
|
||||
{
|
||||
IsSuccess = true
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user