diff --git a/src/schema/mutations/RegisterToEvent.js b/src/schema/mutations/RegisterToEvent.js index 96b529665..8e28ba93f 100644 --- a/src/schema/mutations/RegisterToEvent.js +++ b/src/schema/mutations/RegisterToEvent.js @@ -40,7 +40,7 @@ const resolve = (parent, headers: { authorization }, }).then( (result) => { - if (!result.data.data.teamsByRole.some(team => team.id === participantId)) { + if (!result.data.data.teams_TeamsByRole.some(team => team.id === participantId)) { rej(new WrongArgumentsError('You are not eligible to register this team')); return; } diff --git a/src/schema/mutations/RespondToInvitation.js b/src/schema/mutations/RespondToInvitation.js index d30c67050..e50cf0b6c 100644 --- a/src/schema/mutations/RespondToInvitation.js +++ b/src/schema/mutations/RespondToInvitation.js @@ -44,7 +44,7 @@ const resolve = (parent, headers: { authorization }, }).then( (result) => { - if (!result.data.data.teamsByRole.some(team => team.id === participantId)) { + if (!result.data.data.teams_TeamsByRole.some(team => team.id === participantId)) { rej(new WrongArgumentsError('You are not eligible to register this team')); return; }