Skip to content

Commit

Permalink
fix: Use ?? for null check in auth_cli.dart file
Browse files Browse the repository at this point in the history
  • Loading branch information
sitaram-kalluri committed Sep 12, 2024
1 parent 1f2988d commit b42f09c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/at_onboarding_cli/lib/src/cli/auth_cli.dart
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,9 @@ Future<void> enroll(ArgResults argResults, {AtOnboardingService? svc}) async {
}
try {
stderr.writeln('Submitting enrollment request');
String apkamKeysExpiry = (argResults[AuthCliArgs.argNameExpiry] == null)
// If apkam Keys expiry is not set, then APKAM keys should lives forever.
// Therefore set to 0ms (0 milliseconds) and TTL will not be set.
? '0ms'
: argResults[AuthCliArgs.argNameExpiry];
// If apkam Keys expiry is not set, then APKAM keys should lives forever.
// Therefore set to 0ms (0 milliseconds) and TTL will not be set.
String apkamKeysExpiry = argResults[AuthCliArgs.argNameExpiry] ?? '0ms';
AtEnrollmentResponse er = await svc.sendEnrollRequest(
argResults[AuthCliArgs.argNameAppName],
argResults[AuthCliArgs.argNameDeviceName],
Expand Down

0 comments on commit b42f09c

Please sign in to comment.