mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
update response format
This commit is contained in:
+5
-1
@@ -276,7 +276,7 @@ App::post('/v1/runtimes')
|
||||
throw new Exception('Failed to create build container', 500);
|
||||
}
|
||||
|
||||
$orchestration->networkConnect($runtimeId, App::getEnv('OPEN_RUNTIMES_NETWORK', 'appwrite_runtimes'));
|
||||
$orchestration->networkConnect($runtimeId, App::getEnv('OPEN_RUNTIMES_NETWORK', 'appwrite-runtimes'));
|
||||
|
||||
/**
|
||||
* Execute any commands if they were provided
|
||||
@@ -516,6 +516,7 @@ App::post('/v1/execution')
|
||||
]);
|
||||
|
||||
$executorResponse = \curl_exec($ch);
|
||||
$executorResponse = json_decode($executorResponse, true);
|
||||
|
||||
$statusCode = \curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
|
||||
@@ -545,6 +546,9 @@ App::post('/v1/execution')
|
||||
case $statusCode >= 100:
|
||||
$stdout = $executorResponse['stdout'];
|
||||
$res = $executorResponse['response'];
|
||||
if(is_array($res)) {
|
||||
$res = json_encode($res);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$stderr = ($executorResponse ?? [])['stderr'] ?? 'Execution failed.';
|
||||
|
||||
@@ -451,7 +451,7 @@ sort($patterns);
|
||||
<h1>STDOUT</h1>
|
||||
|
||||
<div class="margin-bottom ide" data-ls-if="({{execution.stdout.length}})">
|
||||
<pre data-ls-bind="{{execution.response}}"></pre>
|
||||
<pre data-ls-bind="{{execution.stdout}}"></pre>
|
||||
</div>
|
||||
|
||||
<div class="margin-bottom" data-ls-if="(!{{execution.stdout.length}})">
|
||||
|
||||
Reference in New Issue
Block a user