diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 5a1427095..fbb1ebcfc 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -984,7 +984,7 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId/status') ->addCookie(Auth::$cookieName, Auth::encodeSession($user->getId(), $secret), (new \DateTime($expire))->getTimestamp(), '/', Config::getParam('cookieDomain'), ('https' == $protocol), true, Config::getParam('cookieSamesite')) ->addCookie(Auth::$cookieName, Auth::encodeSession($user->getId(), $secret), (new \DateTime($expire))->getTimestamp() - 3600, '/', Config::getParam('cookieDomainReset'), ('https' == $protocol), true, Config::getParam('cookieSamesite')) ->addCookie(Auth::$cookieName . '_legacy', Auth::encodeSession($user->getId(), $secret), (new \DateTime($expire))->getTimestamp() - 3600, '/', Config::getParam('cookieDomainReset'), ('https' == $protocol), true, null) - ->setStatusCode(Response::STATUS_CODE_CREATED) + ->setStatusCode(Response::STATUS_CODE_OK) ; $response->dynamic( diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomClientTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomClientTest.php index fb5f4e97a..4ad0a96e5 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomClientTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomClientTest.php @@ -407,7 +407,7 @@ class WebhooksCustomClientTest extends Scope $this->assertEquals($accountSession['headers']['status-code'], 201); $sessionId = $accountSession['body']['$id']; - $session = $accountSession['a_session_' . $this->getProject()['$id']]; + $session = $accountSession['cookies']['a_session_' . $this->getProject()['$id']]; return array_merge($data, [ 'sessionId' => $sessionId,