From 640b2ef3245d50d9d7811bb18fda3fe8896d7dd7 Mon Sep 17 00:00:00 2001 From: Malte2036 <18309412+Malte2036@users.noreply.github.com> Date: Thu, 13 Jan 2022 13:11:08 +0100 Subject: [PATCH] change Error Code to 409 Co-authored-by: Eldad A. Fux --- app/controllers/api/teams.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 8d0e76ac69..293bd7d112 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -627,8 +627,8 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId/status') throw new Exception('Team IDs don\'t match', 404); } - if ($membership->getAttribute('confirm') !== false) { - throw new Exception('Membership already confirmed', 400); + if ($membership->getAttribute('confirm') === true) { + throw new Exception('Membership already confirmed', 409); } $team = Authorization::skip(fn() => $dbForProject->getDocument('teams', $teamId));