putVerify method

  1. @override
Future<bool> putVerify(
  1. String userId,
  2. String verificationCode
)
override

Implementation

@override
Future<bool> putVerify(String userId, String verificationCode) async {
  try {
    final String body = json.encode({'vcode': '$verificationCode'});

    return await dio
        .put('${ApiEndpoints.USER}/$userId',
            queryParameters: {'profile': 3}, data: body)
        .then((value) => true);
  } on Exception catch (e) {
    throw HttpHelper.decodeErrorResponse(e,
        tag: TAG,
        logger: logger,
        defaultErrorMessage: 'Failed to verify user',
        meta: {'user': userId});
  }
}