mirror of
https://github.com/eduardolat/pgbackweb.git
synced 2026-02-09 05:38:28 -06:00
8 lines
213 B
SQL
8 lines
213 B
SQL
-- name: AuthServiceGetUserByToken :one
|
|
SELECT
|
|
users.*,
|
|
sessions.id as session_id
|
|
FROM sessions
|
|
JOIN users ON users.id = sessions.user_id
|
|
WHERE pgp_sym_decrypt(sessions.token, @encryption_key) = @token::TEXT;
|