feat: added sorting and retrieving by author to chirps endpoint
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user