mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
'Buffer' is not assignable to param 'string'
This commit is contained in:
@ -4871,7 +4871,7 @@ function writeSecret(key, value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const fileContents = fs.readFileSync(SECRETS_FILE);
|
const fileContents = fs.readFileSync(SECRETS_FILE);
|
||||||
const secrets = JSON.parse(fileContents);
|
const secrets = JSON.parse(fileContents.toString());
|
||||||
secrets[key] = value;
|
secrets[key] = value;
|
||||||
writeFileAtomicSync(SECRETS_FILE, JSON.stringify(secrets), "utf-8");
|
writeFileAtomicSync(SECRETS_FILE, JSON.stringify(secrets), "utf-8");
|
||||||
}
|
}
|
||||||
@ -4882,7 +4882,7 @@ function readSecret(key) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const fileContents = fs.readFileSync(SECRETS_FILE);
|
const fileContents = fs.readFileSync(SECRETS_FILE);
|
||||||
const secrets = JSON.parse(fileContents);
|
const secrets = JSON.parse(fileContents.toString());
|
||||||
return secrets[key];
|
return secrets[key];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user