diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 4df38f2d45..bb467d4c5b 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -163,7 +163,6 @@ App::init() ->inject('team') ->action(function (App $utopia, Request $request, Database $dbForConsole, Document $project, Document $user, ?Document $session, array $servers, string $mode, Document $team) { $route = $utopia->getRoute(); - $path = $route->getPath(); if ($project->isEmpty()) { throw new Exception(Exception::PROJECT_NOT_FOUND); diff --git a/app/init.php b/app/init.php index fdc4bcd440..d1b703dcec 100644 --- a/app/init.php +++ b/app/init.php @@ -1766,7 +1766,7 @@ App::setResource('team', function (Document $project, Database $dbForConsole, Ap if (str_starts_with($path, '/v1/projects/:projectId')) { $uri = $request->getURI(); $pid = explode('/', $uri)[3]; - $p = $dbForConsole->getDocument('projects', $pid); + $p = Authorization::skip(fn () => $dbForConsole->getDocument('projects', $pid)); $teamInternalId = $p->getAttribute('teamInternalId', ''); } }