add: shared structs, caching services, import task change
This commit is contained in:
41 files changed
+875
-770
No files matched your search
@@ -1,7 +1,7 @@
|
||||
use sqlx::{Pool, Postgres};
|
||||
|
||||
use crate::{
|
||||
routes::{authors::Author, posts::Post},
|
||||
models::{authors::Author, posts::Post},
|
||||
utils::pagination::Pagination,
|
||||
};
|
||||
|
||||
@@ -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, 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",
|
||||
"SELECT p.post_id, a.first_name, a.last_name, p.title, p.body, p.body_gemtext, 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