run method
Implementing classes need to implement required logic in this method to complete their sub-process in the AtSign registration process
Implementation
@override
Future<RegisterApiResult> run() async {
stdout.writeln(
'[Information] Sending verification code to: ${params['email']}');
try {
result.data['otpSent'] = (await registerUtil.registerAtSign(
params['atsign']!, params['email']!,
authority: params['authority']!))
.toString();
stdout.writeln(
'[Information] Verification code sent to: ${params['email']}');
result.apiCallStatus = ApiCallStatus.success;
} on Exception catch (e) {
result.exceptionMessage = e.toString();
result.apiCallStatus =
shouldRetry() ? ApiCallStatus.retry : ApiCallStatus.failure;
}
return result;
}