Cli: Check if user is logged in before trying to get login info

pull/15680/head
Yunus Emre Kalkan 3 years ago
parent 725efea0e3
commit 19249930cf

@ -25,6 +25,12 @@ public class LoginInfoCommand : IConsoleCommand, ITransientDependency
public async Task ExecuteAsync(CommandLineArgs commandLineArgs)
{
if (!AuthService.IsLoggedIn())
{
Logger.LogError("You are not logged in.");
return;
}
var loginInfo = await AuthService.GetLoginInfoAsync();
if (loginInfo == null)

Loading…
Cancel
Save