feat: added sorting and retrieving by author to chirps endpoint

This commit is contained in:
Stevan Freeborn
2026-08-15 21:35:53 -05:00
parent d34c7b5822
commit aaa913ccab
4 changed files with 88 additions and 3 deletions
+5
View File
@@ -19,3 +19,8 @@ WHERE id = $1;
-- name: DeleteChirpById :exec
DELETE FROM chirps WHERE id = $1;
-- name: GetChirpsByAuthor :many
SELECT id, created_at, updated_at, body, user_id FROM chirps
WHERE user_id = $1
ORDER BY created_at ASC;