1
0
Fork 0
mirror of synced 2024-06-27 02:31:04 +12:00

Updated duplicated membership error

This commit is contained in:
Eldad Fux 2020-01-23 01:31:48 +02:00
parent 8f6b5ddf22
commit 3b3c55130f

View file

@ -321,7 +321,7 @@ $utopia->post('/v1/teams/:teamId/memberships')
foreach ($memberships as $member) {
if ($member->getAttribute('userId') == $invitee->getUid()) {
throw new Exception('User has already been invited or is already a member of this team', 400);
throw new Exception('User has already been invited or is already a member of this team', 409);
}
if ($member->getAttribute('userId') == $user->getUid() && in_array('owner', $member->getAttribute('roles', []))) {