fix(mining-admin-web): extract data from response wrapper
mining-admin-service uses TransformInterceptor which wraps all responses
with { success, data, timestamp } format. Frontend needs to access
response.data.data to get the actual data.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
a15dcafc03
commit
29dd1affe1
|
|
@ -40,16 +40,16 @@ export const configsApi = {
|
||||||
|
|
||||||
getMiningStatus: async (): Promise<MiningStatus> => {
|
getMiningStatus: async (): Promise<MiningStatus> => {
|
||||||
const response = await apiClient.get('/configs/mining/status');
|
const response = await apiClient.get('/configs/mining/status');
|
||||||
return response.data;
|
return response.data.data;
|
||||||
},
|
},
|
||||||
|
|
||||||
activateMining: async (): Promise<{ success: boolean; message: string }> => {
|
activateMining: async (): Promise<{ success: boolean; message: string }> => {
|
||||||
const response = await apiClient.post('/configs/mining/activate');
|
const response = await apiClient.post('/configs/mining/activate');
|
||||||
return response.data;
|
return response.data.data;
|
||||||
},
|
},
|
||||||
|
|
||||||
deactivateMining: async (): Promise<{ success: boolean; message: string }> => {
|
deactivateMining: async (): Promise<{ success: boolean; message: string }> => {
|
||||||
const response = await apiClient.post('/configs/mining/deactivate');
|
const response = await apiClient.post('/configs/mining/deactivate');
|
||||||
return response.data;
|
return response.data.data;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue