forked from bssr-nodes/bssr-nodes-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreateData_Prem.js
85 lines (85 loc) · 2.04 KB
/
createData_Prem.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
const axios = require("axios");
global.gamingPREM = [27]; // Gaming nodes
global.botswebdbPREM = [26, 28]; // Bots, Websites and Databases nodes
global.storagePREM = [36]; // Storage nodes
/*
Donator Nodes as followed:
Dono-01 : 26
Dono-02 : 27
Dono-03 : 28
*/
let data = (serverName, userID) => {
let toReturn = {
nginx: null,
nodejs: null,
python: null,
aio: null,
storage: null,
java: null,
paper: null,
forge: null,
altv: null,
multitheftauto: null,
samp: null,
bedrock: null,
pocketminemp: null,
gmod: null,
csgo: null,
arkse: null,
ts3: null,
mumble: null,
rust: null,
mongodb: null,
redis: null,
postgres14: null,
postgres16: null,
daystodie: null,
assettocorsa: null,
avorion: null,
barotrauma: null,
waterfall: null,
spigot: null,
sharex: null,
codeserver: null,
gitea: null,
haste: null,
uptimekuma: null,
rustc: null,
redbot: null,
grafana: null,
openx: null,
mariadb: null,
// minio: null,
lavalink: null,
rabbitmq: null,
palworld: null,
nukkit: null,
curseforge: null,
bun: null,
storage: null,
influxdb: null,
};
for (let [name, filled] of Object.entries(createListPrem)) {
toReturn[name] = filled(serverName, userID);
}
return toReturn;
};
let createServer = (data) => {
return axios({
url: config.Pterodactyl.hosturl +
"/api/application/servers",
method: "POST",
followRedirect: true,
maxRedirects: 5,
headers: {
Authorization: "Bearer " + config.Pterodactyl.apikey,
"Content-Type": "application/json",
Accept: "Application/vnd.pterodactyl.v1+json",
},
data: data,
});
};
module.exports = {
createParams: data,
createServer: createServer,
};