Skip to content

Commit

Permalink
Fixed the issue where places that should remain as string in config w…
Browse files Browse the repository at this point in the history
…ere saved as integer
  • Loading branch information
Mid0aria committed Feb 7, 2025
1 parent 4b58457 commit 01e0ad6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ if (cluster.isMaster) {
sacrifice: value === "sacrifice",
};
} else if (
!excludeKeys.includes(key) &&
!excludeKeys.includes(lastKey) &&
!isNaN(value) &&
value !== true &&
value !== false
Expand Down Expand Up @@ -250,7 +250,7 @@ if (cluster.isMaster) {
app.post("/save-settings", async (req, res) => {
try {
const settings = req.body;
console.log(settings);

const updatedConfig = await updateConfig(settings);

config = updatedConfig;
Expand Down
2 changes: 1 addition & 1 deletion utils/updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ const mergeConfigs = async (client, configPath, backupPath) => {
const oldConfig = await fse.readJson(backupPath);
const newConfig = await fse.readJson(configPath);

// Derin birleştirme yaparak yeni özellikleri koruyoruz
const mergedConfig = deepMerge(newConfig, oldConfig);

await fse.writeJson(configPath, mergedConfig, { spaces: 2 });
Expand Down Expand Up @@ -156,6 +155,7 @@ const updateViaGit = async (client, cp) => {
cp.execSync("git pull --force");
cp.execSync("git reset --hard");
client.logger.info("Updater", "Git", "Update successful");
process.exit(0);
} catch (error) {
throw new Error(`Git update failed: ${error.message}`);
}
Expand Down

0 comments on commit 01e0ad6

Please sign in to comment.