1
0
Fork 0
mirror of synced 2024-09-30 01:08:13 +13:00

fix get usage on Functions

This commit is contained in:
Damodar Lohani 2022-07-17 10:43:10 +00:00
parent dbd941f464
commit f9d62599a4

View file

@ -291,12 +291,6 @@ App::get('/v1/functions/usage')
->inject('dbForProject')
->action(function (string $range, Response $response, Database $dbForProject) {
$function = $dbForProject->getDocument('functions', $functionId);
if ($function->isEmpty()) {
throw new Exception('Function not found', 404, Exception::FUNCTION_NOT_FOUND);
}
$usage = [];
if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') {
$periods = [