fix: unique user id in user session;

feat: login controller method;
fix: name validation hander
This commit is contained in:
2025-07-06 14:00:59 +03:00
parent 333817c9e1
commit bc9f5c6d3c
3 changed files with 22 additions and 4 deletions

View File

@@ -41,7 +41,7 @@ CREATE TABLE IF NOT EXISTS "confirmation_codes" (
CREATE TABLE IF NOT EXISTS "sessions" (
id BIGSERIAL PRIMARY KEY,
user_id BIGINT UNIQUE NOT NULL REFERENCES users(id) ON DELETE CASCADE,
user_id BIGINT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
guid UUID NOT NULL DEFAULT gen_random_uuid(),
name VARCHAR(100),
platform VARCHAR(32),