mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-25 08:20:42 +01:00
JSON.parse wants a string
This commit is contained in:
parent
79e6d4c297
commit
b648d9bd87
@ -4287,7 +4287,7 @@ app.post('/viewsecrets', jsonParser, async (_, response) => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const fileContents = fs.readFileSync(SECRETS_FILE);
|
const fileContents = fs.readFileSync(SECRETS_FILE);
|
||||||
const secrets = JSON.parse(fileContents);
|
const secrets = JSON.parse(fileContents.toString());
|
||||||
return response.send(secrets);
|
return response.send(secrets);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user