feat: registrationBegin method without email;
fix: missing sqlc query parameter name; feat: util for generating security codes; feat: enums package
This commit is contained in:
@@ -94,8 +94,8 @@ WHERE users.username = $1;
|
||||
--: Confirmation Code Object {{{
|
||||
|
||||
;-- name: CreateConfirmationCode :one
|
||||
INSERT INTO confirmation_codes(user_id, code_type, code_hash, expires_at)
|
||||
VALUES ($1, $2, crypt($3, gen_salt('bf')), $4) RETURNING *;
|
||||
INSERT INTO confirmation_codes(user_id, code_type, code_hash)
|
||||
VALUES ($1, $2, crypt(@code::text, gen_salt('bf'))) RETURNING *;
|
||||
|
||||
;-- name: GetConfirmationCodeByCode :one
|
||||
SELECT * FROM confirmation_codes
|
||||
|
||||
@@ -8,7 +8,7 @@ sql:
|
||||
out: "../backend/internal/database"
|
||||
sql_package: "pgx/v5"
|
||||
emit_prepared_queries: true
|
||||
emit_interface: false
|
||||
emit_pointers_for_null_types: true
|
||||
database:
|
||||
# managed: true
|
||||
uri: "postgresql://postgres:postgres@localhost:5432/postgres?sslmode=disable"
|
||||
|
||||
Reference in New Issue
Block a user