Skip to content

Commit 3004aa4

Browse files
committed
fix sql error and rename callback func var
1 parent b8b067e commit 3004aa4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/routes/RouteController.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ export default class RouteController {
242242

243243
const hash: string = bcrypt.hashSync(req.body.password, 10);
244244

245-
base.db.prepare("INSERT INTO accounts VALUES (?, ?, 1000, ?, 0, 0, 0, 0, ?, ?, null, 0, 0, 0, 0)")
245+
base.db.prepare("INSERT INTO accounts VALUES (?, ?, 1000, ?, 0, 0, 0, 0, ?, ?, null, 0, 0, 0)")
246246
.then((v: any) => v.run([
247247
req.body.username,
248248
hash,
@@ -254,7 +254,7 @@ export default class RouteController {
254254
res.send("Account successfully created! Redirecting in 5 seconds...<script>setTimeout(()=>document.location.href='/',5000);</script>");
255255
})
256256
.catch((err: any) => {
257-
return readFile("./public/register.html", "utf8", (err: any, data: any) => {
257+
return readFile("./public/register.html", "utf8", (error: any, data: any) => {
258258
res.send("<script>alert('A server error occurred: " + err + "');</script>" + data);
259259
});
260260
});

0 commit comments

Comments
 (0)