fix team resource

This commit is contained in:
Damodar Lohani
2024-09-04 02:40:53 +00:00
parent 1f83dab9e1
commit 1752c6be44
2 changed files with 1 additions and 2 deletions
-1
View File
@@ -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);
+1 -1
View File
@@ -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', '');
}
}