diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 06af0f7da7..0fcfc20ada 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -430,7 +430,7 @@ App::get('/v1/functions/:functionId') App::get('/v1/functions/:functionId/usage') ->desc('Get Function Usage') - ->groups(['api', 'functions']) + ->groups(['api', 'functions', 'usage']) ->label('scope', 'functions.read') ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.namespace', 'functions') @@ -540,7 +540,7 @@ App::get('/v1/functions/:functionId/usage') App::get('/v1/functions/usage') ->desc('Get Functions Usage') - ->groups(['api', 'functions']) + ->groups(['api', 'functions', 'usage']) ->label('scope', 'functions.read') ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) ->label('sdk.namespace', 'functions') @@ -1604,7 +1604,6 @@ App::post('/v1/functions/:functionId/executions') $execution->setAttribute('logs', $executionResponse['logs']); $execution->setAttribute('errors', $executionResponse['errors']); $execution->setAttribute('duration', $executionResponse['duration']); - } catch (\Throwable $th) { $durationEnd = \microtime(true); diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index 0170031f29..36f6ad0dc5 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -178,7 +178,7 @@ class Executor array $headers, string $runtimeEntrypoint = null, ) { - if(empty($headers['host'])) { + if (empty($headers['host'])) { $headers['host'] = App::getEnv('_APP_DOMAIN', ''); }