change Error Code to 409

Co-authored-by: Eldad A. Fux <eldad.fux@gmail.com>
This commit is contained in:
Malte2036
2022-01-13 13:11:08 +01:00
committed by GitHub
co-authored by Eldad A. Fux
parent c24a7fa611
commit 640b2ef324
+2 -2
View File
@@ -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));