mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix console namespace
This commit is contained in:
@@ -132,7 +132,7 @@ class Database extends Calculator
|
||||
$results = [];
|
||||
$sum = $limit;
|
||||
$latestDocument = null;
|
||||
$this->database->setNamespace('_' . $projectId);
|
||||
$this->database->setNamespace($projectId === 'console' ? $projectId : '_' . $projectId);
|
||||
|
||||
while ($sum === $limit) {
|
||||
try {
|
||||
|
||||
@@ -301,7 +301,7 @@ class TimeSeries extends Calculator
|
||||
private function createOrUpdateMetric(string $projectId, string $time, string $period, string $metric, int $value, int $type): void
|
||||
{
|
||||
$id = \md5("{$time}_{$period}_{$metric}");
|
||||
$this->database->setNamespace('_console');
|
||||
$this->database->setNamespace('console');
|
||||
$project = $this->database->getDocument('projects', $projectId);
|
||||
$this->database->setNamespace('_' . $project->getInternalId());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user