mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-11 17:07:07 +01:00
Change file buffer read handling
This commit is contained in:
parent
f46f2f6901
commit
938e244987
@ -4286,8 +4286,8 @@ app.post('/viewsecrets', jsonParser, async (_, response) => {
|
||||
}
|
||||
|
||||
try {
|
||||
const fileContents = fs.readFileSync(SECRETS_FILE);
|
||||
const secrets = JSON.parse(fileContents.toString());
|
||||
const fileContents = fs.readFileSync(SECRETS_FILE, 'utf8');
|
||||
const secrets = JSON.parse(fileContents);
|
||||
return response.send(secrets);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
Loading…
Reference in New Issue
Block a user