1
0
Fork 0
mirror of synced 2024-06-26 18:20:43 +12:00

Rename to prevent collisions

This commit is contained in:
kodumbeats 2021-10-27 18:17:15 -04:00
parent 656471ced2
commit 79b1fceaf3
5 changed files with 28 additions and 28 deletions

View file

@ -287,7 +287,7 @@ App::get('/v1/database/usage')
$usage = [];
if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') {
$period = [
$periods = [
'24h' => [
'period' => '30m',
'limit' => 48,
@ -321,10 +321,10 @@ App::get('/v1/database/usage')
$stats = [];
Authorization::skip(function() use ($dbForInternal, $period, $range, $metrics, &$stats) {
Authorization::skip(function() use ($dbForInternal, $periods, $range, $metrics, &$stats) {
foreach ($metrics as $metric) {
$limit = $period[$range]['limit'];
$period = $period[$range]['period'];
$limit = $periods[$range]['limit'];
$period = $periods[$range]['period'];
$requestDocs = $dbForInternal->find('stats', [
new Query('period', Query::TYPE_EQUAL, [$period]),
@ -404,7 +404,7 @@ App::get('/v1/database/:collectionId/usage')
$usage = [];
if(App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') {
$period = [
$periods = [
'24h' => [
'period' => '30m',
'limit' => 48,
@ -433,10 +433,10 @@ App::get('/v1/database/:collectionId/usage')
$stats = [];
Authorization::skip(function() use ($dbForInternal, $period, $range, $metrics, &$stats) {
Authorization::skip(function() use ($dbForInternal, $periods, $range, $metrics, &$stats) {
foreach ($metrics as $metric) {
$limit = $period[$range]['limit'];
$period = $period[$range]['period'];
$limit = $periods[$range]['limit'];
$period = $periods[$range]['period'];
$requestDocs = $dbForInternal->find('stats', [
new Query('period', Query::TYPE_EQUAL, [$period]),

View file

@ -176,7 +176,7 @@ App::get('/v1/functions/:functionId/usage')
$usage = [];
if(App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') {
$period = [
$periods = [
'24h' => [
'period' => '30m',
'limit' => 48,
@ -203,10 +203,10 @@ App::get('/v1/functions/:functionId/usage')
$stats = [];
Authorization::skip(function() use ($dbForInternal, $period, $range, $metrics, &$stats) {
Authorization::skip(function() use ($dbForInternal, $periods, $range, $metrics, &$stats) {
foreach ($metrics as $metric) {
$limit = $period[$range]['limit'];
$period = $period[$range]['period'];
$limit = $periods[$range]['limit'];
$period = $periods[$range]['period'];
$requestDocs = $dbForInternal->find('stats', [
new Query('period', Query::TYPE_EQUAL, [$period]),

View file

@ -255,7 +255,7 @@ App::get('/v1/projects/:projectId/usage')
$usage = [];
if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') {
$period = [
$periods = [
'24h' => [
'period' => '30m',
'limit' => 48,
@ -288,10 +288,10 @@ App::get('/v1/projects/:projectId/usage')
$stats = [];
Authorization::skip(function() use ($dbForInternal, $period, $range, $metrics, &$stats) {
Authorization::skip(function() use ($dbForInternal, $periods, $range, $metrics, &$stats) {
foreach ($metrics as $metric) {
$limit = $period[$range]['limit'];
$period = $period[$range]['period'];
$limit = $periods[$range]['limit'];
$period = $periods[$range]['period'];
$requestDocs = $dbForInternal->find('stats', [
new Query('period', Query::TYPE_EQUAL, [$period]),

View file

@ -670,7 +670,7 @@ App::get('/v1/storage/usage')
$usage = [];
if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') {
$period = [
$periods = [
'24h' => [
'period' => '30m',
'limit' => 48,
@ -696,10 +696,10 @@ App::get('/v1/storage/usage')
$stats = [];
Authorization::skip(function() use ($dbForInternal, $period, $range, $metrics, &$stats) {
Authorization::skip(function() use ($dbForInternal, $periods, $range, $metrics, &$stats) {
foreach ($metrics as $metric) {
$limit = $period[$range]['limit'];
$period = $period[$range]['period'];
$limit = $periods[$range]['limit'];
$period = $periods[$range]['period'];
$requestDocs = $dbForInternal->find('stats', [
new Query('period', Query::TYPE_EQUAL, [$period]),
@ -764,7 +764,7 @@ App::get('/v1/storage/:bucketId/usage')
$usage = [];
if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') {
$period = [
$periods = [
'24h' => [
'period' => '30m',
'limit' => 48,
@ -793,10 +793,10 @@ App::get('/v1/storage/:bucketId/usage')
$stats = [];
Authorization::skip(function() use ($dbForInternal, $period, $range, $metrics, &$stats) {
Authorization::skip(function() use ($dbForInternal, $periods, $range, $metrics, &$stats) {
foreach ($metrics as $metric) {
$limit = $period[$range]['limit'];
$period = $period[$range]['period'];
$limit = $periods[$range]['limit'];
$period = $periods[$range]['period'];
$requestDocs = $dbForInternal->find('stats', [
new Query('period', Query::TYPE_EQUAL, [$period]),

View file

@ -780,7 +780,7 @@ App::get('/v1/users/usage')
$usage = [];
if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') {
$period = [
$periods = [
'24h' => [
'period' => '30m',
'limit' => 48,
@ -812,10 +812,10 @@ App::get('/v1/users/usage')
$stats = [];
Authorization::skip(function() use ($dbForInternal, $period, $range, $metrics, &$stats) {
Authorization::skip(function() use ($dbForInternal, $periods, $range, $metrics, &$stats) {
foreach ($metrics as $metric) {
$limit = $period[$range]['limit'];
$period = $period[$range]['period'];
$limit = $periods[$range]['limit'];
$period = $periods[$range]['period'];
$requestDocs = $dbForInternal->find('stats', [
new Query('period', Query::TYPE_EQUAL, [$period]),