acceptGroupApplication method

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

Implementation

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

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