feat: migrate legacy database to new location and improve last login update handling

This commit is contained in:
simosmik
2026-02-23 22:12:00 +00:00
parent f986004319
commit 50e097d4ac
3 changed files with 26 additions and 5 deletions

View File

@@ -53,11 +53,11 @@ router.post('/register', async (req, res) => {
// Generate token
const token = generateToken(user);
// Update last login
db.prepare('COMMIT').run();
// Update last login (non-fatal, outside transaction)
userDb.updateLastLogin(user.id);
db.prepare('COMMIT').run();
res.json({
success: true,
user: { id: user.id, username: user.username },