Added logout functionality. IO-403
This commit is contained in:
@@ -174,5 +174,25 @@ namespace BodyshopPartner.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _logoutCommand;
|
||||
public ICommand LogoutCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_logoutCommand == null)
|
||||
{
|
||||
_logoutCommand = new RelayCommand(
|
||||
p => true,
|
||||
p =>
|
||||
{
|
||||
Logout();
|
||||
});
|
||||
}
|
||||
return _logoutCommand;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,7 +189,16 @@ namespace BodyshopPartner.ViewModels
|
||||
IndeterminateLoading = false;
|
||||
}
|
||||
|
||||
public async Task LoadBodyshopData()
|
||||
|
||||
public void Logout()
|
||||
{
|
||||
Properties.Settings.Default.AuthToken = "";
|
||||
Properties.Settings.Default.RefreshToken = "";
|
||||
Properties.Settings.Default.Save();
|
||||
App.Current.Shutdown();
|
||||
}
|
||||
|
||||
public async Task LoadBodyshopData()
|
||||
{
|
||||
var r = new GraphQLRequest
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user