Fix reset-password (issue caused by 5027fcd320)

This commit is contained in:
Louis Lam
2022-04-08 00:56:56 +08:00
parent 008dc27f52
commit 7bbaeffd3e
2 changed files with 13 additions and 9 deletions

View File

@@ -1,7 +1,5 @@
console.log("== Uptime Kuma Reset Password Tool ==");
console.log("Loading the database");
const Database = require("../server/database");
const { R } = require("redbean-node");
const readline = require("readline");
@@ -13,8 +11,9 @@ const rl = readline.createInterface({
});
const main = async () => {
console.log("Connecting the database");
Database.init(args);
await Database.connect();
await Database.connect(false, false, true);
try {
// No need to actually reset the password for testing, just make sure no connection problem. It is ok for now.