fix: add UNIQUE on email, check dup email in profile update, generic error messages in auth route

This commit is contained in:
2026-07-12 04:20:56 +08:00
parent f2fec8e609
commit 5dd0db76be
2 changed files with 15 additions and 7 deletions

View File

@@ -67,7 +67,7 @@ async function initSchema(connection) {
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(50) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL,
email VARCHAR(100) NOT NULL,
email VARCHAR(100) NOT NULL UNIQUE,
game_name VARCHAR(50) NOT NULL,
game_uid VARCHAR(50) NOT NULL,
role ENUM('owner','admin','player') NOT NULL DEFAULT 'player',