2023-05-23 12:51:21 +02:00
|
|
|
|
const apiUri = "http://localhost:5177";
|
|
|
|
|
|
2023-05-23 13:15:29 +02:00
|
|
|
|
function GetAvailableControllers(){
|
|
|
|
|
var uri = apiUri + "/GetAvailableControllers";
|
|
|
|
|
const response = await fetch(uri, {
|
|
|
|
|
method: 'GET',
|
|
|
|
|
headers: {
|
|
|
|
|
'Accept': 'application/json'
|
|
|
|
|
}
|
|
|
|
|
}).catch(error => console.error('Unable to get items.', error));
|
|
|
|
|
return await response.json();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2023-05-23 12:51:21 +02:00
|
|
|
|
function GetTasks(){
|
2023-05-23 13:15:29 +02:00
|
|
|
|
var uri = apiUri + "/Tasks/GetList";
|
|
|
|
|
const response = await fetch(uri, {
|
|
|
|
|
method: 'GET',
|
|
|
|
|
headers: {
|
|
|
|
|
'Accept': 'application/json'
|
|
|
|
|
}
|
|
|
|
|
}).catch(error => console.error('Unable to get items.', error));
|
|
|
|
|
return await response.json();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function GetSettings(){
|
|
|
|
|
var uri = apiUri + "/Settings/Get";
|
|
|
|
|
const response = await fetch(uri, {
|
|
|
|
|
method: 'GET',
|
|
|
|
|
headers: {
|
|
|
|
|
'Accept': 'application/json'
|
|
|
|
|
}
|
|
|
|
|
}).catch(error => console.error('Unable to get items.', error));
|
|
|
|
|
return await response.json();
|
2023-05-23 12:51:21 +02:00
|
|
|
|
}
|