Browse Source

Merge pull request #15680 from abpframework/cli-fix-login-info-error-text

Cli: Check if user is logged in before trying to get login info
pull/15685/head
Berkan Sasmaz 4 years ago
committed by GitHub
parent
commit
7e47c65785
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginInfoCommand.cs

6
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/LoginInfoCommand.cs

@ -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