Merge remote-tracking branch 'origin/1.1.x' into feat-graphql-support

# Conflicts:
#	CHANGES.md
#	app/config/specs/open-api3-latest-client.json
#	app/config/specs/open-api3-latest-console.json
#	app/config/specs/open-api3-latest-server.json
#	app/config/specs/swagger2-latest-client.json
#	app/config/specs/swagger2-latest-console.json
#	app/config/specs/swagger2-latest-server.json
#	app/init.php
#	app/tasks/sdks.php
#	composer.lock
#	docker-compose.yml
This commit is contained in:
Jake Barnby
2022-11-16 19:37:35 +13:00
48 changed files with 1071 additions and 1079 deletions
+3 -3
View File
@@ -1116,8 +1116,8 @@ App::get('/v1/users/usage')
if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') {
$periods = [
'24h' => [
'period' => '30m',
'limit' => 48,
'period' => '1h',
'limit' => 24,
],
'7d' => [
'period' => '1d',
@@ -1171,7 +1171,7 @@ App::get('/v1/users/usage')
while ($backfill > 0) {
$last = $limit - $backfill - 1; // array index of last added metric
$diff = match ($period) { // convert period to seconds for unix timestamp math
'30m' => 1800,
'1h' => 3600,
'1d' => 86400,
};
$stats[$metric][] = [