- Add HTTP handlers for issues, comments, agents, workspaces, inbox, members, and activity - Implement JWT authentication middleware with Bearer token validation - Add sqlc queries for all entities (CRUD operations) - Extract router into reusable NewRouter() for testability - Expand SDK with full API client methods (CRUD for all resources) - Add updateWorkspace to SDK, add Member type to shared types Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
20 lines
399 B
SQL
20 lines
399 B
SQL
-- name: GetUser :one
|
|
SELECT * FROM "user"
|
|
WHERE id = $1;
|
|
|
|
-- name: GetUserByEmail :one
|
|
SELECT * FROM "user"
|
|
WHERE email = $1;
|
|
|
|
-- name: CreateUser :one
|
|
INSERT INTO "user" (name, email, avatar_url)
|
|
VALUES ($1, $2, $3)
|
|
RETURNING *;
|
|
|
|
-- name: UpdateUser :one
|
|
UPDATE "user" SET
|
|
name = COALESCE($2, name),
|
|
avatar_url = COALESCE($3, avatar_url),
|
|
updated_at = now()
|
|
WHERE id = $1
|
|
RETURNING *;
|