chirpy_server/sql/queries/update_users.sql

7 lines
185 B
MySQL
Raw Normal View History

2024-10-26 15:03:14 +02:00
-- name: UpdateUserCredentials :one
UPDATE users
SET email = $2,
hashed_password = $3,
updated_at = NOW()
WHERE users.id = $1
RETURNING id, created_at, updated_at, email, is_chirpy_red;