webhooks and chirps by user id

This commit is contained in:
2025-03-13 22:47:03 +02:00
parent bad1d140ee
commit 66be0a2b40
13 changed files with 195 additions and 24 deletions

View File

@@ -13,7 +13,7 @@ import (
const updateUserEmailAndPassword = `-- name: UpdateUserEmailAndPassword :one
UPDATE users SET email = $1, hashed_password = $2, updated_at = CURRENT_TIMESTAMP WHERE id = $3
RETURNING id, created_at, updated_at, email, hashed_password
RETURNING id, created_at, updated_at, email, hashed_password, is_chirpy_red
`
type UpdateUserEmailAndPasswordParams struct {
@@ -31,6 +31,7 @@ func (q *Queries) UpdateUserEmailAndPassword(ctx context.Context, arg UpdateUser
&i.UpdatedAt,
&i.Email,
&i.HashedPassword,
&i.IsChirpyRed,
)
return i, err
}