performOperation method

  1. @override
void performOperation(
  1. ModSignUpDTO dto
)
override

Abstraction to perform some operation using params received. Must be overriden by children.

Implementation

@override
void performOperation(ModSignUpDTO dto) async {

  var res;
  try {
    var data = await this.repo.signUp(dto.mail, dto.pass, dto.name);

    res = this.buildResult(data: data);

  } on ModDataException {
    res = this.buildResult(data: null, code: ModErrorCodes.SIGNUP);

  } on Exception{
    res = this.buildResult(data: null, code: ModErrorCodes.SIGNUP);

  } finally {
    this.processData(res);
  }
}