fixed problem regarding config variable names

This commit is contained in:
2023-03-16 12:06:14 +01:00
parent 6448ecf7f5
commit 393918139a
4 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -54,13 +54,13 @@ module.exports = {
}
fetch(`${config.panel.url}/api/client/servers/${serverid}/command`,{
fetch(`${mainconfig.panel.url}/api/client/servers/${serverid}/command`,{
"method": "POST",
"headers": {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": `Bearer ${await commands.get("profile_handler").getKey(interactionObject)}`,
'User-Agent': `${config.panel.useragent}`,
'User-Agent': `${mainconfig.panel.useragent}`,
},
"body": JSON.stringify({
"command": `${command}`
+2 -2
View File
@@ -73,13 +73,13 @@ module.exports = {
return;
}
fetch(`${config.panel.url}/api/client/servers/${serverid}/power`,{
fetch(`${mainconfig.panel.url}/api/client/servers/${serverid}/power`,{
"method": "POST",
"headers": {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": `Bearer ${await commands.get("profile_handler").getKey(interactionObject)}`,
'User-Agent': `${config.panel.useragent}`,
'User-Agent': `${mainconfig.panel.useragent}`,
},
"body": JSON.stringify({
"signal": `${action}`
+6 -6
View File
@@ -54,25 +54,25 @@ module.exports = {
fetch(`${config.panel.url}/api/client/servers/${serverid}`,{
fetch(`${mainconfig.panel.url}/api/client/servers/${serverid}`,{
"method": "GET",
"headers": {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": `Bearer ${await commands.get("profile_handler").getKey(interactionObject)}`,
'User-Agent': `${config.panel.useragent}`,
'User-Agent': `${mainconfig.panel.useragent}`,
}
})
.then(async response => {
response = await response.json()
var response2 = await fetch(`${config.panel.url}/api/client/servers/${serverid}/resources`,{
var response2 = await fetch(`${mainconfig.panel.url}/api/client/servers/${serverid}/resources`,{
"method": "GET",
"headers": {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": `Bearer ${await commands.get("profile_handler").getKey(interactionObject)}`,
'User-Agent': `${config.panel.useragent}`,
'User-Agent': `${mainconfig.panel.useragent}`,
}
})
@@ -116,13 +116,13 @@ module.exports = {
fetch(`${config.panel.url}/api/client`,{
fetch(`${mainconfig.panel.url}/api/client`,{
"method": "GET",
"headers": {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": `Bearer ${await commands.get("profile_handler").getKey(interactionObject)}`,
'User-Agent': `${config.panel.useragent}`,
'User-Agent': `${mainconfig.panel.useragent}`,
}
})
.then(async response => {