mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-18 17:27:50 -05:00
Brought up to date with the private repository (a06d3c5)
This commit is contained in:
commit
eda992fcff
144 files changed
+31026
No files matched your search
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
// forgets the admin panel's password, so the panel asks for a new one the
|
||||
// next time it is opened. restart the server afterwards: from another machine
|
||||
// the panel will want the setup code it prints at start.
|
||||
//
|
||||
// node tools/reset-admin-password.js
|
||||
|
||||
const path = require("path");
|
||||
const {DatabaseSync} = require("node:sqlite");
|
||||
const config = require("../config.js");
|
||||
|
||||
const db = new DatabaseSync(path.join(config.dataDir, "game.sqlite"));
|
||||
const result = db.prepare("DELETE FROM settings WHERE key = 'admin_password'").run();
|
||||
console.log(result.changes ? "The admin password is forgotten. Restart the server, then open /admin." : "There was no admin password.");
|
||||
Reference in new issue
Block a user