- Config: try ENV_FILE, .env, ../.env for loading; trim trailing slash from BaseURL - Log BASE_URL at server startup for verification - .env.example: document BASE_URL - Tasks, projects, tags, migrations and related API/handlers Made-with: Cursor
17 lines
453 B
SQL
17 lines
453 B
SQL
-- name: CreateTaskWebhook :one
|
|
INSERT INTO task_webhooks (id, owner_id, url, events, secret)
|
|
VALUES ($1, $2, $3, COALESCE($4, '[]'), $5)
|
|
RETURNING *;
|
|
|
|
-- name: GetTaskWebhookByID :one
|
|
SELECT * FROM task_webhooks
|
|
WHERE id = $1 AND owner_id = $2;
|
|
|
|
-- name: ListTaskWebhooksByOwner :many
|
|
SELECT * FROM task_webhooks
|
|
WHERE owner_id = $1
|
|
ORDER BY created_at DESC;
|
|
|
|
-- name: DeleteTaskWebhook :exec
|
|
DELETE FROM task_webhooks WHERE id = $1 AND owner_id = $2;
|