fix(mining): 修复 DailySnapshot API 路径 v1→v2 + deploy-mining.sh 默认 standalone

- fetchContributionRatios URL 从 /api/v1/ 改为 /api/v2/ 与 contribution-service 的 globalPrefix 匹配
- deploy-mining.sh 默认部署模式从 shared 改为 standalone

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-03-03 08:27:57 -08:00
parent 54e22b4709
commit a392f708a7
2 changed files with 5 additions and 5 deletions

View File

@ -8,8 +8,8 @@
# affecting the 1.0 system.
#
# Deploy Modes (set via DEPLOY_MODE env var):
# shared (default) Co-located with 1.0, shares PostgreSQL/Redis/Kafka
# standalone Separate server with local PostgreSQL/Redis, remote Kafka (192.168.1.111:9093)
# standalone (default) Separate server with local PostgreSQL/Redis, remote Kafka (192.168.1.111:9093)
# shared Co-located with 1.0, shares PostgreSQL/Redis/Kafka (use: DEPLOY_MODE=shared)
#
# Usage:
# ./deploy-mining.sh up [service] # Start all or specific service
@ -60,8 +60,8 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ENV_FILE="$SCRIPT_DIR/.env"
COMPOSE_FILE="$SCRIPT_DIR/docker-compose.2.0.yml"
# Deployment mode: "shared" (default, same server as 1.0) or "standalone" (separate server)
DEPLOY_MODE="${DEPLOY_MODE:-shared}"
# Deployment mode: "standalone" (default, separate server) or "shared" (same server as 1.0)
DEPLOY_MODE="${DEPLOY_MODE:-standalone}"
# 2.0 Services
MINING_SERVICES=(

View File

@ -124,7 +124,7 @@ export class ContributionSyncService {
pageSize: number,
): Promise<{ data: ContributionData[]; total: number } | null> {
try {
const url = `${baseUrl}/api/v1/snapshots/${snapshotDate}/ratios?page=${page}&pageSize=${pageSize}`;
const url = `${baseUrl}/api/v2/snapshots/${snapshotDate}/ratios?page=${page}&pageSize=${pageSize}`;
const response = await fetch(url);
if (!response.ok) {