Skip to content

Commit

Permalink
fix: Add "default" case to switch in processVerb
Browse files Browse the repository at this point in the history
  • Loading branch information
sitaram-kalluri committed Oct 18, 2023
1 parent da3a4ca commit 2e49ad4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class OtpVerbHandler extends AbstractVerbHandler {
OtpVerbHandler(SecondaryKeyStore keyStore) : super(keyStore);

@override
bool accept(String command) => command.startsWith('otp');
bool accept(String command) => command == 'otp:get';

@override
Verb getVerb() => otpVerb;
Expand Down Expand Up @@ -51,6 +51,8 @@ class OtpVerbHandler extends AbstractVerbHandler {
'${DateTime.now().toUtc().add(Duration(milliseconds: otpExpiryInMills)).millisecondsSinceEpoch}'
..metaData = (AtMetaData()..ttl = otpExpiryInMills));
break;
default:
throw InvalidSyntaxException('$operation is not a valid operation');
}
}

Expand Down

0 comments on commit 2e49ad4

Please sign in to comment.