Bug fixing after QA
This commit is contained in:
parent
34d310154f
commit
c3cef56e39
3 changed files with 15 additions and 9 deletions
|
@ -3615,7 +3615,7 @@ $collections = [
|
|||
'required' => false,
|
||||
'default' => null,
|
||||
'array' => false,
|
||||
'filters' => [],
|
||||
'filters' => ['json'],
|
||||
],
|
||||
[
|
||||
'$id' => ID::custom('responseStatusCode'),
|
||||
|
@ -3637,7 +3637,7 @@ $collections = [
|
|||
'required' => false,
|
||||
'default' => null,
|
||||
'array' => false,
|
||||
'filters' => [],
|
||||
'filters' => ['json'],
|
||||
],
|
||||
[
|
||||
'$id' => ID::custom('search'),
|
||||
|
|
|
@ -130,17 +130,17 @@ function router(App $utopia, Database $dbForConsole, SwooleRequest $swooleReques
|
|||
|
||||
$execution = \json_decode($executionResponse, true);
|
||||
|
||||
foreach ($execution['headers'] as $header => $value) {
|
||||
$response->setHeader($header, $value);
|
||||
foreach ($execution['responseHeaders'] as $header) {
|
||||
$response->setHeader($header['key'], $header['value']);
|
||||
}
|
||||
|
||||
$body = $execution['body'] ?? '';
|
||||
$body = $execution['responseBody'] ?? '';
|
||||
|
||||
if (($execution['headers']['x-open-runtimes-encoding'] ?? '') === 'base64') {
|
||||
if (($execution['responseHeaders']['x-open-runtimes-encoding'] ?? '') === 'base64') {
|
||||
$body = \base64_decode($body);
|
||||
}
|
||||
|
||||
$response->setStatusCode($execution['statusCode'] ?? 200)->send($body);
|
||||
$response->setStatusCode($execution['responseStatusCode'] ?? 200)->send($body);
|
||||
return true;
|
||||
} elseif ($type === 'api') {
|
||||
return false;
|
||||
|
@ -172,6 +172,7 @@ App::init()
|
|||
|
||||
$host = $request->getHostname() ?? '';
|
||||
$mainDomain = App::getEnv('_APP_DOMAIN', '');
|
||||
\var_dump($host);
|
||||
// Only run Router when external domain
|
||||
if ($host !== $mainDomain && $host !== 'localhost') {
|
||||
if (router($utopia, $dbForConsole, $swooleRequest, $request, $response)) {
|
||||
|
|
|
@ -153,6 +153,11 @@ class BuildsV1 extends Worker
|
|||
try {
|
||||
if ($isNewBuild) {
|
||||
if ($isVcsEnabled) {
|
||||
$installation = $dbForConsole->getDocument('vcsInstallations', $installationId, [
|
||||
Query::equal('projectInternalId', [$project->getInternalId()])
|
||||
]);
|
||||
$providerInstallationId = $installation->getAttribute('providerInstallationId');
|
||||
|
||||
$privateKey = App::getEnv('_APP_VCS_GITHUB_PRIVATE_KEY');
|
||||
$githubAppId = App::getEnv('_APP_VCS_GITHUB_APP_ID');
|
||||
|
||||
|
@ -162,9 +167,9 @@ class BuildsV1 extends Worker
|
|||
$rootDirectory = \ltrim($rootDirectory, '.');
|
||||
$rootDirectory = \ltrim($rootDirectory, '/');
|
||||
|
||||
$github->initialiseVariables($installationId, $privateKey, $githubAppId);
|
||||
$github->initialiseVariables($providerInstallationId, $privateKey, $githubAppId);
|
||||
|
||||
$owner = $github->getOwnerName($installationId);
|
||||
$owner = $github->getOwnerName($providerInstallationId);
|
||||
$repositoryName = $github->getRepositoryName($providerRepositoryId);
|
||||
|
||||
$cloneOwner = !empty($providerContribution) ? $providerContribution->getAttribute('owner', $owner) : $owner;
|
||||
|
|
Loading…
Reference in a new issue