fleshed out publish date
This commit is contained in:
1 parent
bc8e093651
commit
7f04dabf92
6 files changed
+17
-12
No files matched your search
@@ -53,7 +53,7 @@ impl AuthorsDatasource {
|
||||
|
||||
let posts_query = sqlx::query_as!(
|
||||
Post,
|
||||
"SELECT p.post_id, a.first_name, a.last_name, p.title, p.body, p.created_at, a.author_id FROM posts p LEFT JOIN authors a ON a.author_id = p.author_id WHERE p.deleted_at IS NULL AND p.author_id = $1 ORDER BY created_at DESC LIMIT $2 OFFSET $3",
|
||||
"SELECT p.post_id, a.first_name, a.last_name, p.title, p.body, p.created_at, p.publish_date, a.author_id FROM posts p LEFT JOIN authors a ON a.author_id = p.author_id WHERE p.deleted_at IS NULL AND p.author_id = $1 ORDER BY created_at DESC LIMIT $2 OFFSET $3",
|
||||
author_id,
|
||||
pagination.limit,
|
||||
offset,
|
||||
|
||||
Reference in new issue
Block a user