diff --git a/app/controllers/api/vcs.php b/app/controllers/api/vcs.php index 01a0817b55..c424e6884f 100644 --- a/app/controllers/api/vcs.php +++ b/app/controllers/api/vcs.php @@ -1796,7 +1796,8 @@ App::patch('/v1/vcs/github/installations/:installationId/repositories/:repositor throw new Exception(Exception::INSTALLATION_NOT_FOUND); } - $repository = Authorization::skip(fn () => $dbForPlatform->getDocument('repositories', $repositoryId, [ + $repository = Authorization::skip(fn () => $dbForPlatform->findOne('repositories', [ + Query::equal('$id', [$repositoryId]), Query::equal('projectInternalId', [$project->getSequence()]) ]));