bug fixes
All checks were successful
Deploy / deploy-staging (push) Successful in 24s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-06-22 02:00:04 +02:00
parent 64a1c5811d
commit ded344fd65
2 changed files with 27 additions and 2 deletions

View File

@@ -1284,6 +1284,9 @@ final class Router
'row_count' => count($rows),
'limit' => self::BOOTSTRAP_MEASUREMENT_LIMIT,
]);
$rows = $this->ensureMeasurementFxReferences($projectKey, $rows, $settings);
return $this->analytics()->enrichMeasurements($rows, $settings, [
'full_latest_only' => in_array($view, ['overview', 'mining'], true),
]);

View File

@@ -133,7 +133,18 @@ final class MiningRepository
'SELECT * FROM ' . $this->table('cost_plans') . ' WHERE project_key = :project_key AND owner_sub = :owner_sub ORDER BY starts_at DESC, id DESC'
);
$stmt->execute(['project_key' => $projectKey, 'owner_sub' => $this->ownerSub]);
return $this->normalizeRows($stmt->fetchAll() ?: []);
$rows = $this->normalizeRows($stmt->fetchAll() ?: []);
if ($rows !== []) {
return $rows;
}
// Legacy fallback: older cost plan rows may exist without a user scope assignment.
$legacyStmt = $this->pdo->prepare(
'SELECT * FROM ' . $this->table('cost_plans') . ' WHERE project_key = :project_key ORDER BY starts_at DESC, id DESC'
);
$legacyStmt->execute(['project_key' => $projectKey]);
return $this->normalizeRows($legacyStmt->fetchAll() ?: []);
}
public function saveCostPlan(string $projectKey, array $payload): array
@@ -793,7 +804,18 @@ final class MiningRepository
'SELECT * FROM ' . $this->table('purchased_miners') . ' WHERE project_key = :project_key AND owner_sub = :owner_sub ORDER BY purchased_at DESC, id DESC'
);
$stmt->execute(['project_key' => $projectKey, 'owner_sub' => $this->ownerSub]);
return $this->normalizeRows($stmt->fetchAll() ?: []);
$rows = $this->normalizeRows($stmt->fetchAll() ?: []);
if ($rows !== []) {
return $rows;
}
// Legacy fallback: older purchased miner rows may exist without a user scope assignment.
$legacyStmt = $this->pdo->prepare(
'SELECT * FROM ' . $this->table('purchased_miners') . ' WHERE project_key = :project_key ORDER BY purchased_at DESC, id DESC'
);
$legacyStmt->execute(['project_key' => $projectKey]);
return $this->normalizeRows($legacyStmt->fetchAll() ?: []);
}
public function getPurchasedMiner(string $projectKey, int $minerId): ?array