fix(mining-admin-service): 修复 manual-mining 和 pending-contributions 内部调用 URL

这两个 service 调用 mining-service 时缺少 /api/v2/mining 前缀,
导致请求到达 mining-service 后 404。

修复前: ${miningServiceUrl}/admin/manual-mining/records
修复后: ${miningServiceUrl}/api/v2/mining/admin/manual-mining/records

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-02-02 02:24:00 -08:00
parent 6f43408da5
commit 3bce996dd3
2 changed files with 8 additions and 8 deletions

View File

@ -40,7 +40,7 @@ export class ManualMiningService {
async calculate(request: ManualMiningCalculateRequest): Promise<any> { async calculate(request: ManualMiningCalculateRequest): Promise<any> {
try { try {
const response = await fetch( const response = await fetch(
`${this.miningServiceUrl}/admin/manual-mining/calculate`, `${this.miningServiceUrl}/api/v2/mining/admin/manual-mining/calculate`,
{ {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
@ -79,7 +79,7 @@ export class ManualMiningService {
): Promise<any> { ): Promise<any> {
try { try {
const response = await fetch( const response = await fetch(
`${this.miningServiceUrl}/admin/manual-mining/execute`, `${this.miningServiceUrl}/api/v2/mining/admin/manual-mining/execute`,
{ {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
@ -135,7 +135,7 @@ export class ManualMiningService {
async getRecords(page: number = 1, pageSize: number = 20): Promise<any> { async getRecords(page: number = 1, pageSize: number = 20): Promise<any> {
try { try {
const response = await fetch( const response = await fetch(
`${this.miningServiceUrl}/admin/manual-mining/records?page=${page}&pageSize=${pageSize}`, `${this.miningServiceUrl}/api/v2/mining/admin/manual-mining/records?page=${page}&pageSize=${pageSize}`,
{ {
method: 'GET', method: 'GET',
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
@ -170,7 +170,7 @@ export class ManualMiningService {
async getRecordByAccountSequence(accountSequence: string): Promise<any> { async getRecordByAccountSequence(accountSequence: string): Promise<any> {
try { try {
const response = await fetch( const response = await fetch(
`${this.miningServiceUrl}/admin/manual-mining/records/${accountSequence}`, `${this.miningServiceUrl}/api/v2/mining/admin/manual-mining/records/${accountSequence}`,
{ {
method: 'GET', method: 'GET',
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },

View File

@ -36,7 +36,7 @@ export class PendingContributionsService {
} }
const response = await firstValueFrom( const response = await firstValueFrom(
this.httpService.get(`${miningServiceUrl}/admin/pending-contributions`, { this.httpService.get(`${miningServiceUrl}/api/v2/mining/admin/pending-contributions`, {
params, params,
}), }),
); );
@ -59,7 +59,7 @@ export class PendingContributionsService {
try { try {
const response = await firstValueFrom( const response = await firstValueFrom(
this.httpService.get( this.httpService.get(
`${miningServiceUrl}/admin/pending-contributions/summary`, `${miningServiceUrl}/api/v2/mining/admin/pending-contributions/summary`,
), ),
); );
@ -89,7 +89,7 @@ export class PendingContributionsService {
try { try {
const response = await firstValueFrom( const response = await firstValueFrom(
this.httpService.get( this.httpService.get(
`${miningServiceUrl}/admin/pending-contributions/${id}/records`, `${miningServiceUrl}/api/v2/mining/admin/pending-contributions/${id}/records`,
{ {
params: { page, pageSize }, params: { page, pageSize },
}, },
@ -120,7 +120,7 @@ export class PendingContributionsService {
try { try {
const response = await firstValueFrom( const response = await firstValueFrom(
this.httpService.get( this.httpService.get(
`${miningServiceUrl}/admin/pending-contributions/mining-records`, `${miningServiceUrl}/api/v2/mining/admin/pending-contributions/mining-records`,
{ {
params: { page, pageSize }, params: { page, pageSize },
}, },