mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix id
This commit is contained in:
@@ -4317,7 +4317,7 @@ App::get('/v1/databases/:databaseId/usage')
|
||||
|
||||
Authorization::skip(function () use ($dbForLogs, $days, $logsDBMetrics, &$stats) {
|
||||
foreach ($logsDBMetrics as $metric) {
|
||||
$result = $dbForLogs->getDocument('stats', '_inf_' . $metric);
|
||||
$result = $dbForLogs->getDocument('stats', md5('_inf_' . $metric));
|
||||
$stats[$metric]['total'] = $result->getAttribute('value', 0);
|
||||
|
||||
$limit = $days['limit'];
|
||||
@@ -4344,7 +4344,7 @@ App::get('/v1/databases/:databaseId/usage')
|
||||
|
||||
Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) {
|
||||
foreach ($metrics as $metric) {
|
||||
$result = $dbForProject->getDocument('stats', '_inf_' . $metric);
|
||||
$result = $dbForProject->getDocument('stats', md5('_inf_' . $metric));
|
||||
|
||||
$stats[$metric]['total'] = $result['value'] ?? 0;
|
||||
$limit = $days['limit'];
|
||||
@@ -4442,7 +4442,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/usage')
|
||||
|
||||
Authorization::skip(function () use ($dbForLogs, $days, $metrics, &$stats) {
|
||||
foreach ($metrics as $metric) {
|
||||
$result = $dbForLogs->getDocument('stats', '_inf_' . $metric);
|
||||
$result = $dbForLogs->getDocument('stats', md5('_inf_' . $metric));
|
||||
$stats[$metric]['total'] = $result['value'] ?? 0;
|
||||
|
||||
$limit = $days['limit'];
|
||||
|
||||
@@ -641,8 +641,8 @@ App::get('/v1/functions/:functionId/usage')
|
||||
|
||||
Authorization::skip(function () use ($dbForLogs, $days, $logsDBMetrics, &$stats) {
|
||||
foreach ($logsDBMetrics as $metric) {
|
||||
$result = $dbForLogs->getDocument('stats', '_inf_' . $metric);
|
||||
$stats[$metric]['total'] = $result['value'] ?? 0;
|
||||
$result = $dbForLogs->getDocument('stats', md5('_inf_' . $metric));
|
||||
$stats[$metric]['total'] = $result->getAttribute('value', 0);
|
||||
|
||||
$limit = $days['limit'];
|
||||
$period = $days['period'];
|
||||
@@ -670,7 +670,7 @@ App::get('/v1/functions/:functionId/usage')
|
||||
|
||||
Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) {
|
||||
foreach ($metrics as $metric) {
|
||||
$result = $dbForProject->getDocument('stats', '_inf_' . $metric);
|
||||
$result = $dbForProject->getDocument('stats', md5('_inf_' . $metric));
|
||||
$stats[$metric]['total'] = $result['value'] ?? 0;
|
||||
|
||||
$limit = $days['limit'];
|
||||
@@ -768,7 +768,7 @@ App::get('/v1/functions/usage')
|
||||
|
||||
Authorization::skip(function () use ($dbForLogs, $days, $logsDBMetrics, &$stats) {
|
||||
foreach ($logsDBMetrics as $metric) {
|
||||
$result = $dbForLogs->getDocument('stats', '_inf_' . $metric);
|
||||
$result = $dbForLogs->getDocument('stats', md5('_inf_' . $metric));
|
||||
$stats[$metric]['total'] = $result['value'] ?? 0;
|
||||
|
||||
$limit = $days['limit'];
|
||||
@@ -797,7 +797,7 @@ App::get('/v1/functions/usage')
|
||||
|
||||
Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) {
|
||||
foreach ($metrics as $metric) {
|
||||
$result = $dbForProject->getDocument('stats', '_inf_' . $metric);
|
||||
$result = $dbForProject->getDocument('stats', md5('_inf_' . $metric));
|
||||
$stats[$metric]['total'] = $result['value'] ?? 0;
|
||||
|
||||
$limit = $days['limit'];
|
||||
|
||||
@@ -1799,7 +1799,7 @@ App::get('/v1/storage/usage')
|
||||
$total = [];
|
||||
Authorization::skip(function () use ($dbForLogs, $days, $metrics, &$stats, &$total) {
|
||||
foreach ($metrics as $metric) {
|
||||
$result = $dbForLogs->getDocument('stats', '_inf_' . $metric);
|
||||
($result = $dbForLogs->getDocument('stats', md5('_inf_' . $metric));
|
||||
$stats[$metric]['total'] = $result['value'] ?? 0;
|
||||
|
||||
$limit = $days['limit'];
|
||||
@@ -1889,7 +1889,7 @@ App::get('/v1/storage/:bucketId/usage')
|
||||
|
||||
Authorization::skip(function () use ($dbForLogs, $bucket, $days, $metrics, &$stats) {
|
||||
foreach ($metrics as $metric) {
|
||||
$result = $dbForLogs->getDocument('stats', '_inf_' . $metric);
|
||||
$result = $dbForLogs->getDocument('stats', md5('_inf_' . $metric));
|
||||
$stats[$metric]['total'] = $result['value'] ?? 0;
|
||||
|
||||
$limit = $days['limit'];
|
||||
|
||||
Reference in New Issue
Block a user