From c703b0b25e16f040870f1b21a95326b18b073514 Mon Sep 17 00:00:00 2001 From: RealBeepMcJeep Date: Wed, 30 Aug 2023 07:42:34 -0700 Subject: [PATCH] 'Buffer' is not assignable to param 'string' --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index ad82a7e8f..b27223e29 100644 --- a/server.js +++ b/server.js @@ -4871,7 +4871,7 @@ function writeSecret(key, value) { } const fileContents = fs.readFileSync(SECRETS_FILE); - const secrets = JSON.parse(fileContents); + const secrets = JSON.parse(fileContents.toString()); secrets[key] = value; writeFileAtomicSync(SECRETS_FILE, JSON.stringify(secrets), "utf-8"); } @@ -4882,7 +4882,7 @@ function readSecret(key) { } const fileContents = fs.readFileSync(SECRETS_FILE); - const secrets = JSON.parse(fileContents); + const secrets = JSON.parse(fileContents.toString()); return secrets[key]; }