feat: added sorting and retrieving by author to chirps endpoint

This commit is contained in:
Stevan Freeborn committed 2026-08-15 21:35:53 -05:00
1 parent d34c7b5822
commit aaa913ccab
4 files changed
+88 -3

No files matched your search

+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;