fix team resource

This commit is contained in:
Damodar Lohani 2024-09-05 08:32:50 +05:45 committed by GitHub
parent 59760bf529
commit 7dc64c12a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1768,6 +1768,10 @@ App::setResource('team', function (Document $project, Database $dbForConsole, Ap
$pid = explode('/', $uri)[3];
$p = Authorization::skip(fn () => $dbForConsole->getDocument('projects', $pid));
$teamInternalId = $p->getAttribute('teamInternalId', '');
} elseif ($path === '/v1/projects') {
$teamId = $request->getParam('teamId', '');
$team = Authorization::skip(fn () => $dbForConsole->getDocument('teams', $teamId));
return $team;
}
}