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,
|
'required' => false,
|
||||||
'default' => null,
|
'default' => null,
|
||||||
'array' => false,
|
'array' => false,
|
||||||
'filters' => [],
|
'filters' => ['json'],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'$id' => ID::custom('responseStatusCode'),
|
'$id' => ID::custom('responseStatusCode'),
|
||||||
|
@ -3637,7 +3637,7 @@ $collections = [
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'default' => null,
|
'default' => null,
|
||||||
'array' => false,
|
'array' => false,
|
||||||
'filters' => [],
|
'filters' => ['json'],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'$id' => ID::custom('search'),
|
'$id' => ID::custom('search'),
|
||||||
|
|
|
@ -130,17 +130,17 @@ function router(App $utopia, Database $dbForConsole, SwooleRequest $swooleReques
|
||||||
|
|
||||||
$execution = \json_decode($executionResponse, true);
|
$execution = \json_decode($executionResponse, true);
|
||||||
|
|
||||||
foreach ($execution['headers'] as $header => $value) {
|
foreach ($execution['responseHeaders'] as $header) {
|
||||||
$response->setHeader($header, $value);
|
$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);
|
$body = \base64_decode($body);
|
||||||
}
|
}
|
||||||
|
|
||||||
$response->setStatusCode($execution['statusCode'] ?? 200)->send($body);
|
$response->setStatusCode($execution['responseStatusCode'] ?? 200)->send($body);
|
||||||
return true;
|
return true;
|
||||||
} elseif ($type === 'api') {
|
} elseif ($type === 'api') {
|
||||||
return false;
|
return false;
|
||||||
|
@ -172,6 +172,7 @@ App::init()
|
||||||
|
|
||||||
$host = $request->getHostname() ?? '';
|
$host = $request->getHostname() ?? '';
|
||||||
$mainDomain = App::getEnv('_APP_DOMAIN', '');
|
$mainDomain = App::getEnv('_APP_DOMAIN', '');
|
||||||
|
\var_dump($host);
|
||||||
// Only run Router when external domain
|
// Only run Router when external domain
|
||||||
if ($host !== $mainDomain && $host !== 'localhost') {
|
if ($host !== $mainDomain && $host !== 'localhost') {
|
||||||
if (router($utopia, $dbForConsole, $swooleRequest, $request, $response)) {
|
if (router($utopia, $dbForConsole, $swooleRequest, $request, $response)) {
|
||||||
|
|
|
@ -153,6 +153,11 @@ class BuildsV1 extends Worker
|
||||||
try {
|
try {
|
||||||
if ($isNewBuild) {
|
if ($isNewBuild) {
|
||||||
if ($isVcsEnabled) {
|
if ($isVcsEnabled) {
|
||||||
|
$installation = $dbForConsole->getDocument('vcsInstallations', $installationId, [
|
||||||
|
Query::equal('projectInternalId', [$project->getInternalId()])
|
||||||
|
]);
|
||||||
|
$providerInstallationId = $installation->getAttribute('providerInstallationId');
|
||||||
|
|
||||||
$privateKey = App::getEnv('_APP_VCS_GITHUB_PRIVATE_KEY');
|
$privateKey = App::getEnv('_APP_VCS_GITHUB_PRIVATE_KEY');
|
||||||
$githubAppId = App::getEnv('_APP_VCS_GITHUB_APP_ID');
|
$githubAppId = App::getEnv('_APP_VCS_GITHUB_APP_ID');
|
||||||
|
|
||||||
|
@ -162,9 +167,9 @@ class BuildsV1 extends Worker
|
||||||
$rootDirectory = \ltrim($rootDirectory, '.');
|
$rootDirectory = \ltrim($rootDirectory, '.');
|
||||||
$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);
|
$repositoryName = $github->getRepositoryName($providerRepositoryId);
|
||||||
|
|
||||||
$cloneOwner = !empty($providerContribution) ? $providerContribution->getAttribute('owner', $owner) : $owner;
|
$cloneOwner = !empty($providerContribution) ? $providerContribution->getAttribute('owner', $owner) : $owner;
|
||||||
|
|
Loading…
Reference in a new issue