- public int handleCommand(final Namespace ns, final RegistrationManager m) {
- final boolean voiceVerification = ns.getBoolean("voice");
- final String captcha = ns.getString("captcha");
+ public void handleCommand(final Namespace ns, final RegistrationManager m) throws CommandException {
+ final boolean voiceVerification = Boolean.TRUE.equals(ns.getBoolean("voice"));
+ final var captcha = ns.getString("captcha");
+
+ register(m, voiceVerification, captcha);
+ }
+
+ @Override
+ public TypeReference<RegistrationParams> getRequestType() {
+ return new TypeReference<>() {};
+ }
+
+ @Override
+ public List<OutputType> getSupportedOutputTypes() {
+ return List.of(OutputType.PLAIN_TEXT, OutputType.JSON);
+ }