JSON.parse wants a string

This commit is contained in:
RealBeepMcJeep 2023-08-30 09:08:27 -07:00
parent 79e6d4c297
commit b648d9bd87
1 changed files with 1 additions and 1 deletions

View File

@ -4287,7 +4287,7 @@ app.post('/viewsecrets', jsonParser, async (_, response) => {
try {
const fileContents = fs.readFileSync(SECRETS_FILE);
const secrets = JSON.parse(fileContents);
const secrets = JSON.parse(fileContents.toString());
return response.send(secrets);
} catch (error) {
console.error(error);