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 {
|
try {
|
||||||
const fileContents = fs.readFileSync(SECRETS_FILE);
|
const fileContents = fs.readFileSync(SECRETS_FILE, 'utf8');
|
||||||
const secrets = JSON.parse(fileContents.toString());
|
const secrets = JSON.parse(fileContents);
|
||||||
return response.send(secrets);
|
return response.send(secrets);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|
Loading…
Reference in New Issue