fix: fetch task infos from correct node

This commit is contained in:
2025-08-28 09:47:02 +02:00
parent c840a4da84
commit eba7bec030
3 changed files with 23 additions and 3 deletions

View File

@@ -85,9 +85,12 @@ class ApiClient {
}
}
async getTasksStatus() {
async getTasksStatus(ip) {
try {
const response = await fetch(`${this.baseUrl}/api/tasks/status`, {
const url = ip
? `${this.baseUrl}/api/tasks/status?ip=${encodeURIComponent(ip)}`
: `${this.baseUrl}/api/tasks/status`;
const response = await fetch(url, {
method: 'GET',
headers: {
'Accept': 'application/json'