JSON.parse wants a string

This commit is contained in:
RealBeepMcJeep 2023-08-30 11:24:22 -07:00
parent a5aadd936c
commit 113ea1d0ec
1 changed files with 1 additions and 1 deletions

View File

@ -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;