fix(mining-admin-service): 修复mining-service API路径为v2
This commit is contained in:
parent
09b15da3cb
commit
d404521841
|
|
@ -50,7 +50,7 @@ export class ConfigController {
|
|||
async getMiningStatus() {
|
||||
const miningServiceUrl = this.appConfigService.get<string>('MINING_SERVICE_URL', 'http://localhost:3021');
|
||||
try {
|
||||
const response = await fetch(`${miningServiceUrl}/api/v1/admin/status`);
|
||||
const response = await fetch(`${miningServiceUrl}/api/v2/admin/status`);
|
||||
if (!response.ok) {
|
||||
throw new Error('Failed to fetch mining status');
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@ export class ConfigController {
|
|||
async activateMining(@Req() req: any) {
|
||||
const miningServiceUrl = this.appConfigService.get<string>('MINING_SERVICE_URL', 'http://localhost:3021');
|
||||
try {
|
||||
const response = await fetch(`${miningServiceUrl}/api/v1/admin/activate`, {
|
||||
const response = await fetch(`${miningServiceUrl}/api/v2/admin/activate`, {
|
||||
method: 'POST',
|
||||
});
|
||||
if (!response.ok) {
|
||||
|
|
@ -90,7 +90,7 @@ export class ConfigController {
|
|||
async deactivateMining(@Req() req: any) {
|
||||
const miningServiceUrl = this.appConfigService.get<string>('MINING_SERVICE_URL', 'http://localhost:3021');
|
||||
try {
|
||||
const response = await fetch(`${miningServiceUrl}/api/v1/admin/deactivate`, {
|
||||
const response = await fetch(`${miningServiceUrl}/api/v2/admin/deactivate`, {
|
||||
method: 'POST',
|
||||
});
|
||||
if (!response.ok) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue