feat: implemented handling webhooks

This commit is contained in:
Stevan Freeborn
2026-08-15 20:18:21 -05:00
parent c3fded4492
commit d34c7b5822
6 changed files with 198 additions and 29 deletions
+10 -2
View File
@@ -19,9 +19,17 @@ RETURNING *;
DELETE FROM users;
-- name: GetUserById :one
SELECT id, created_at, updated_at, email, hashed_password FROM users
SELECT id, created_at, updated_at, email, hashed_password, is_chirpy_red FROM users
WHERE id = $1;
-- name: GetUserByEmail :one
SELECT id, created_at, updated_at, email, hashed_password FROM users
SELECT id, created_at, updated_at, email, hashed_password, is_chirpy_red FROM users
WHERE email = $1;
-- name: UpgradeUser :one
UPDATE users
SET is_chirpy_red = TRUE
WHERE id = $1
RETURNING *;
+7
View File
@@ -0,0 +1,7 @@
-- +goose Up
ALTER TABLE users
ADD is_chirpy_red BOOLEAN NOT NULL DEFAULT FALSE;
-- +goose Down
ALTER TABLE users
DROP COLUMN is_chirpy_red;