acceptInvitation method
Accept an invitation
invitationId
The ID of the invitation to accept
Implementation
Future<AcceptInvitationResponse> acceptInvitation({required String invitationId}) async {
try {
final response = await dio.post(
"/organization/accept-invitation",
data: {"invitationId": invitationId},
options: await getOptions(isTokenRequired: true),
);
return AcceptInvitationResponse.fromJson(response.data);
} catch (e) {
final message = getErrorMessage(e);
if (message == null) rethrow;
throw message;
}
}