acceptInvite method

  1. @override
Future<void> acceptInvite(
  1. String token,
  2. int id
)
override

Accepts the invite with the given id.

Implementation

@override
Future<void> acceptInvite(String token, int id) async {
  log('Accepting invite $id');

  try {
    await _apiService.callFunction(
      function: 'local_lbplanner_plan_accept_invite',
      token: token,
      body: {
        'inviteid': id,
      },
    );

    log('Invite $id accepted');
  } catch (e, s) {
    log('Failed to accept invite $id', e, s);
    rethrow;
  }
}