From 113ea1d0ec786a08682cd8ee3299b7ef3daedf43 Mon Sep 17 00:00:00 2001 From: RealBeepMcJeep Date: Wed, 30 Aug 2023 11:24:22 -0700 Subject: [PATCH] JSON.parse wants a string --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index f4e5b2246..7fef8f2c0 100644 --- a/server.js +++ b/server.js @@ -4181,7 +4181,7 @@ function migrateSecrets() { try { let modified = false; const fileContents = fs.readFileSync(SETTINGS_FILE, 'utf8'); - const settings = JSON.parse(fileContents); + const settings = JSON.parse(fileContents.toString()); const oaiKey = settings?.api_key_openai; const hordeKey = settings?.horde_settings?.api_key; const novelKey = settings?.api_key_novel;