Skip to content

Commit

Permalink
fix syncthing enable api
Browse files Browse the repository at this point in the history
  • Loading branch information
IrosTheBeggar committed Mar 13, 2024
1 parent c686ace commit 3e7c509
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/util/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,12 +349,14 @@ exports.lockAdminApi = async (val) => {
}

exports.enableFederation = async (val) => {
const memClone = JSON.parse(JSON.stringify(config.program.federation));
memClone.enabled = val;

const loadConfig = await this.loadFile(config.configFile);
loadConfig.federation.enabled = val;
loadConfig.federation = memClone;
await this.saveFile(loadConfig, config.configFile);

config.program.federation.enabled = val;

syncthing.setup();
}

Expand Down

0 comments on commit 3e7c509

Please sign in to comment.