Passwords!

This commit is contained in:
2025-03-11 19:54:00 +02:00
parent 647edb6d25
commit 6661fdf89b
10 changed files with 128 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
-- name: CreateUser :one
INSERT INTO users (id, created_at, updated_at, email)
VALUES (gen_random_uuid(), NOW(), NOW(), $1)
INSERT INTO users (id, created_at, updated_at, email, hashed_password)
VALUES (gen_random_uuid(), NOW(), NOW(), $1, $2)
RETURNING *;

View File

@@ -0,0 +1,2 @@
-- name: GetUserByEmail :one
SELECT * FROM users WHERE email = $1;