mirror of
https://github.com/YGGverse/flarumdown.git
synced 2026-03-31 16:55:29 +00:00
filter posts by content type
This commit is contained in:
parent
b9e833c0ca
commit
bf6eef581f
1 changed files with 1 additions and 1 deletions
|
|
@ -89,7 +89,7 @@ impl Database {
|
|||
pub fn posts(&mut self, discussion_id: i64) -> Result<Vec<Post>, Error> {
|
||||
self.0.prepare(
|
||||
"SELECT `id`, `user_id`, `created_at`, `edited_at`, `content`
|
||||
FROM `posts` WHERE `discussion_id` = ? AND `is_private` <> 1 AND `is_approved` <> 0 AND `hidden_at` IS NULL
|
||||
FROM `posts` WHERE `discussion_id` = ? AND `type` = 'comment' AND `is_private` <> 1 AND `is_approved` <> 0 AND `hidden_at` IS NULL
|
||||
ORDER BY `number` ASC",
|
||||
)?.query_map([discussion_id], |row| {
|
||||
Ok(Post {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue