removeMember method

  1. @override
Future<void> removeMember(
  1. String token,
  2. int userId
)
override

Removes the member with the given userId from the plan of the user associated with the given token.

Implementation

@override
Future<void> removeMember(String token, int userId) async {
  log('Removing member $userId');

  try {
    await _apiService.callFunction(
      function: 'local_lbplanner_plan_remove_user',
      token: token,
      body: {
        'memberid': userId,
      },
    );

    log('Member $userId removed');
  } catch (e, s) {
    log('Failed to remove member $userId', e, s);
    rethrow;
  }
}