mirror of
https://git.coolaj86.com/coolaj86/telebit.js.git
synced 2025-04-21 19:40:37 +00:00
save config on upgrade token
This commit is contained in:
parent
9441bf7f8e
commit
fce8e366c6
@ -664,6 +664,7 @@ state.handlers = {
|
|||||||
console.info("Updating '" + tokenpath + "' with new token:");
|
console.info("Updating '" + tokenpath + "' with new token:");
|
||||||
try {
|
try {
|
||||||
require('fs').writeFileSync(tokenpath, opts.jwt);
|
require('fs').writeFileSync(tokenpath, opts.jwt);
|
||||||
|
fs.writeFileSync(confpath, YAML.safeDump(snakeCopy(state.config)));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Token not saved:");
|
console.error("Token not saved:");
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user