Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Akkadius committed Jan 20, 2020
1 parent cfcb2e5 commit 2b8f1b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/core/auth-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module.exports = {
if (!this.appKey) {
this.appKey = uuidv4();
eqemuConfigService.setAdminPanelConfig('application.key', this.appKey);
eqemuConfigService.saveServerConfig();
eqemuConfigService.saveServerConfig(this.getServerConfig());
}

return this;
Expand Down Expand Up @@ -72,7 +72,7 @@ module.exports = {
'application.admin.password',
this.genRandomString(30)
);

eqemuConfigService.saveServerConfig();
}

Expand Down
4 changes: 4 additions & 0 deletions app/core/eqemu-config-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ module.exports = {
* @returns {module.exports}
*/
saveServerConfig(data = undefined) {
if (!data) {
data = this.getFreshServerConfig()
}

debug('[saveServerConfig] writing config')

fs.writeFileSync(
Expand Down

0 comments on commit 2b8f1b7

Please sign in to comment.