refuseGroupApplication method

Future refuseGroupApplication(
  1. Map<String, dynamic> params
)

Implementation

Future<dynamic> refuseGroupApplication(Map<String, dynamic> params) async {
  try {
    final handleApplicationParams =
        HandleGroupApplication.formateParams(params, 'Reject');
    final res = await wrappedPromiseToFuture(
        timeweb!.handleGroupApplication(handleApplicationParams));
    if (res.code == 0) {
      return CommonUtils.returnSuccess(jsToMap(jsToMap(res.data)['group']));
    }

    return CommonUtils.returnError('Reject group application error');
  } catch (error) {
    return CommonUtils.returnError(error.toString());
  }
}