Specify read encoding

This commit is contained in:
Cohee 2023-08-30 22:04:11 +03:00
parent ce46e1a4ca
commit f5e52eab05
1 changed files with 1 additions and 1 deletions

View File

@ -4180,7 +4180,7 @@ function migrateSecrets() {
try { try {
let modified = false; let modified = false;
const fileContents = fs.readFileSync(SETTINGS_FILE); const fileContents = fs.readFileSync(SETTINGS_FILE, 'utf8');
const settings = JSON.parse(fileContents); const settings = JSON.parse(fileContents);
const oaiKey = settings?.api_key_openai; const oaiKey = settings?.api_key_openai;
const hordeKey = settings?.horde_settings?.api_key; const hordeKey = settings?.horde_settings?.api_key;