Skip to content

Commit 38315c6

Browse files
committed
trocar local
1 parent 5fc9f19 commit 38315c6

3 files changed

Lines changed: 26 additions & 38 deletions

File tree

index.js

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import fs from 'fs';
22
import db from './functions/database.js';
33
import version from './functions/version.js';
44

5-
function createStatusFile(callback) {
5+
function createStatusFile() {
66
try {
77
version(db);
88
} catch (err) {
@@ -18,7 +18,7 @@ function createStatusFile(callback) {
1818

1919
if (panel === undefined || panel_p === undefined || wings === undefined || syncing === undefined || lastSynced === undefined) {
2020
console.log("Algum valor é indefinido. Tentando novamente em 10 segundos...");
21-
setTimeout(createStatusFile, 10000, callback);
21+
setTimeout(createStatusFile, 10000);
2222
return;
2323
}
2424

@@ -31,26 +31,30 @@ function createStatusFile(callback) {
3131
}
3232
};
3333
const json = JSON.stringify(data, null, 2);
34-
fs.writeFile("jexactyl.json", json, (err) => {
35-
console.log("Arquivo jexactyl.json criado com sucesso");
34+
fs.writeFile("./version/jexactyl.json", json, (err) => {
35+
if (err) {
36+
console.error(err.message);
37+
} else {
38+
console.log("Arquivo jexactyl.json criado com sucesso");
39+
}
40+
});
3641

37-
const data_p = {
38-
"daemon": "0.9.999",
39-
"panel": db.get('panel_p'),
40-
wings,
41-
"sftp": "1.0.5",
42-
"discord": "https://discord.gg/Wf8Eycz4Tq",
43-
lastSynced
44-
};
45-
const json_p = JSON.stringify(data_p, null, 2);
46-
fs.writeFile("pterodactyl.json", json_p, (err) => {
47-
if (err) {
48-
console.error(err.message);
49-
callback(err);
50-
} else {
51-
console.log("Arquivo pterodactyl.json criado com sucesso");
52-
}
53-
});
54-
})
42+
const data_p = {
43+
"daemon": "0.9.999",
44+
"panel": db.get('panel_p'),
45+
wings,
46+
"sftp": "1.0.5",
47+
"discord": "https://discord.gg/Wf8Eycz4Tq",
48+
lastSynced
49+
};
50+
const json_p = JSON.stringify(data_p, null, 2);
51+
fs.writeFile("./version/pterodactyl.json", json_p, (err) => {
52+
if (err) {
53+
console.error(err.message);
54+
} else {
55+
console.log("Arquivo pterodactyl.json criado com sucesso");
56+
}
57+
});
5558
}
59+
5660
createStatusFile();

jexactyl.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

pterodactyl.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)